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:
paths:
- test-release.cdb
json:
.json:
stage: prepare2
dependencies:
- merge_databases
......@@ -52,24 +52,37 @@ json:
YGOPRO_PIC_URL_SUFFIX: '.jpg'
FIELDS: 'name,desc,overallString,picUrl'
GIT_DEPTH: '1000'
# REF_COMMIT: '1.34'
OUTPUT_FILENAME: test-release.json
REF_COMMIT: '1.34' # 更新的时候改这里
script:
- apt update;apt -y install wget
- currentPath=$PWD
- cd /usr/src/app
- 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
artifacts:
paths:
- 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:
stage: pack
dependencies:
- merge_databases
- json
- json2
tags:
- linux
script:
......@@ -82,6 +95,7 @@ pack:
- mv pack data/
- mv *.ini data/
- mv test-release.json data/
- mv test-release-v2.json data/
- git show -s --format=%ct $CI_COMMIT_SHA > data/version.txt
- cd data
- 7z a -mx9 ../archive/ygopro-super-pre.zip pics script pack *.cdb *.conf *.ini
......@@ -141,6 +155,7 @@ upload_version_json:
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/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:
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