Commit 7f7244ec authored by nanahira's avatar nanahira

Update .gitlab-ci.yml

parent d3919af8
Pipeline #25074 passed with stages
in 1 minute and 14 seconds
...@@ -40,7 +40,7 @@ merge_databases: ...@@ -40,7 +40,7 @@ merge_databases:
paths: paths:
- test-release.cdb - test-release.cdb
json: .json:
stage: prepare2 stage: prepare2
dependencies: dependencies:
- merge_databases - merge_databases
...@@ -52,24 +52,37 @@ json: ...@@ -52,24 +52,37 @@ json:
YGOPRO_PIC_URL_SUFFIX: '.jpg' YGOPRO_PIC_URL_SUFFIX: '.jpg'
FIELDS: 'name,desc,overallString,picUrl' FIELDS: 'name,desc,overallString,picUrl'
GIT_DEPTH: '1000' GIT_DEPTH: '1000'
# REF_COMMIT: '1.34' OUTPUT_FILENAME: test-release.json
REF_COMMIT: '1.34' # 更新的时候改这里
script: script:
- apt update;apt -y install wget - apt update;apt -y install wget
- currentPath=$PWD - currentPath=$PWD
- cd /usr/src/app - cd /usr/src/app
- wget -O strings.conf https://code.mycard.moe/mycard/ygopro-database/-/raw/master/locales/zh-CN/strings.conf - wget -O strings.conf https://code.mycard.moe/mycard/ygopro-database/-/raw/master/locales/zh-CN/strings.conf
- env GIT_PATH=$currentPath node dist $currentPath/test-release.cdb ./strings.conf $currentPath/test-strings.conf > $currentPath/test-release.json - env GIT_PATH=$currentPath node dist $currentPath/test-release.cdb ./strings.conf $currentPath/test-strings.conf > $currentPath/$OUTPUT_FILENAME
- cd $currentPath - cd $currentPath
artifacts: artifacts:
paths: paths:
- test-release.json - test-release.json
json:
extends: .json
json2:
extends: .json
variables:
FIELDS: 'name,desc,overallString,picUrl,createTime,createCommit,updateTime,updateCommit,created,updated'
OUTPUT_FILENAME: test-release-v2.json
artifacts:
paths:
- test-release-v2.json
pack: pack:
stage: pack stage: pack
dependencies: dependencies:
- merge_databases - merge_databases
- json - json
- json2
tags: tags:
- linux - linux
script: script:
...@@ -82,6 +95,7 @@ pack: ...@@ -82,6 +95,7 @@ pack:
- mv pack data/ - mv pack data/
- mv *.ini data/ - mv *.ini data/
- mv test-release.json data/ - mv test-release.json data/
- mv test-release-v2.json data/
- git show -s --format=%ct $CI_COMMIT_SHA > data/version.txt - git show -s --format=%ct $CI_COMMIT_SHA > data/version.txt
- cd data - cd data
- 7z a -mx9 ../archive/ygopro-super-pre.zip pics script pack *.cdb *.conf *.ini - 7z a -mx9 ../archive/ygopro-super-pre.zip pics script pack *.cdb *.conf *.ini
...@@ -141,6 +155,7 @@ upload_version_json: ...@@ -141,6 +155,7 @@ upload_version_json:
script: script:
- aws s3 --endpoint=https://minio.mycard.moe:9000 cp data/version.txt s3://mycard/ygopro-super-pre/versions/$CI_COMMIT_REF_NAME/version.txt - aws s3 --endpoint=https://minio.mycard.moe:9000 cp data/version.txt s3://mycard/ygopro-super-pre/versions/$CI_COMMIT_REF_NAME/version.txt
- aws s3 --endpoint=https://minio.mycard.moe:9000 cp data/test-release.json s3://mycard/ygopro-super-pre/versions/$CI_COMMIT_REF_NAME/test-release.json - aws s3 --endpoint=https://minio.mycard.moe:9000 cp data/test-release.json s3://mycard/ygopro-super-pre/versions/$CI_COMMIT_REF_NAME/test-release.json
- aws s3 --endpoint=https://minio.mycard.moe:9000 cp data/test-release-v2.json s3://mycard/ygopro-super-pre/versions/$CI_COMMIT_REF_NAME/test-release-v2.json
deploy: deploy:
stage: deploy stage: deploy
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment