Commit aa3f111f authored by nanahira's avatar nanahira

ci for new packager

parent ef565cb6
Pipeline #4818 canceled with stages
in 1 minute and 15 seconds
......@@ -3,7 +3,7 @@ set -x
set -o errexit
# TARGET_LOCALE
apt update && apt -y install tar git
apt update && apt -y install tar git zstd
git submodule update --init
mkdir dist replay
tar -zcf dist/ygopro-$CI_COMMIT_REF_NAME-linux-$TARGET_LOCALE.tar.gz --exclude='.git*' ygopro LICENSE README.md lib lflist.conf strings.conf system.conf cards.cdb script textures deck single pics replay sound windbot bot bot.conf
tar --zstd -cf dist/ygopro-$CI_COMMIT_REF_NAME-linux-$TARGET_LOCALE.tar.zst --exclude='.git*' ygopro LICENSE README.md lib lflist.conf strings.conf system.conf cards.cdb script textures deck single pics replay sound windbot bot bot.conf
......@@ -3,7 +3,7 @@ set -x
set -o errexit
# TARGET_LOCALE
apt update && apt -y install tar git
apt update && apt -y install tar git zstd
git submodule update --init
mkdir dist replay
tar -zcf dist/ygopro-$CI_COMMIT_REF_NAME-osx-$TARGET_LOCALE.tar.gz --exclude='.git*' ygopro.app LICENSE README.md lflist.conf strings.conf system.conf cards.cdb script textures deck single pics replay sound windbot bot bot.conf
tar --zstd -cf dist/ygopro-$CI_COMMIT_REF_NAME-darwin-$TARGET_LOCALE.tar.zst --exclude='.git*' ygopro.app LICENSE README.md lflist.conf strings.conf system.conf cards.cdb script textures deck single pics replay sound windbot bot bot.conf
......@@ -3,7 +3,7 @@ set -x
set -o errexit
# TARGET_LOCALE
apt update && apt -y install tar git
apt update && apt -y install tar git zstd
git submodule update --init
mkdir dist replay
tar -zcf dist/ygopro-$CI_COMMIT_REF_NAME-win32-$TARGET_LOCALE.tar.gz --exclude='.git*' ygopro.exe LICENSE README.md lflist.conf strings.conf system.conf cards.cdb script textures deck single pics replay sound bot.conf Bot.exe WindBot
tar --zstd -cf dist/ygopro-$CI_COMMIT_REF_NAME-win32-$TARGET_LOCALE.tar.zst --exclude='.git*' ygopro.exe LICENSE README.md lflist.conf strings.conf system.conf cards.cdb script textures deck single pics replay sound bot.conf Bot.exe WindBot
#!/bin/bash
set -o errexit
apt update; apt -y install curl jq
apiRoot=https://api.moecube.com
loginInfo=$(curl -sL -X POST $apiRoot/accounts/signin -d account=$MYCARD_USERNAME -d password=$MYCARD_PASSWORD)
token=$(echo $loginInfo | jq '.token' | sed 's/"//g')
header="Authorization: $token"
echo "Login succeeded."
appName="ygopro"
runForDepot() {
platform=$1
locale=$2
archivePath="./dist/ygopro-$appVersion-$platform-$locale.tar.zst"
suffix="?platform=$platform&locale=$locale&arch=generic"
echo "Uploading $archivePath"
curl -H "$header" -X POST "$apiRoot/release/api/build/$appName/${appVersion}${suffix}" -F file=@$archivePath
}
runForDepot win32 zh-CN
runForDepot linux zh-CN
runForDepot darwin zh-CN
runForDepot win32 en-US
runForDepot linux en-US
runForDepot darwin en-US
......@@ -504,7 +504,7 @@ pack_macos_en-US:
- tags
- gitlabci
upload_to_minio:
upload:
stage: deploy
dependencies:
- pack_windows_zh-CN
......@@ -515,26 +515,8 @@ upload_to_minio:
- pack_macos_en-US
tags:
- linux
script:
- aws s3 --endpoint=https://minio.mycard.moe:9000 sync dist/ s3://mycard/mcpro
- cd dist
- ls -1 > ../dist-files.txt
- cd ..
artifacts:
paths:
- dist-files.txt
only:
- tags
- gitlabci
trigger:
stage: notify
dependencies:
- upload_to_minio
tags:
- linux
script:
- apt update; apt -y install curl
- 'curl -X POST https://api.mycard.moe/ygopro/release-helper/release -H "Authorization: $RELEASE_HELPER_TOKEN" -F "name=$CI_COMMIT_TAG" -F "file=@./dist-files.txt"'
variables:
appVersion: $CI_COMMIT_TAG
script: ./.ci/update-packager.sh
only:
- tags
Subproject commit 8b5b9b7793dfd8ad77c75fe4a27477ca2b4e6c96
Subproject commit 735ec9cc8191a9a5bb0670d9ada8653a2dfac05f
Subproject commit c8919a9349d0de9fa177af2c352ee3c753f57c02
Subproject commit 8b82a865db02c71e7910555cfd06eb388a6fc387
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