Commit d371a8a7 authored by nanahira's avatar nanahira

Update .gitlab-ci.yml

parent a55262ee
Pipeline #40853 canceled with stages
in 1 second
......@@ -158,29 +158,50 @@ resources:
- ./index.sh makeBuild mdpro3 ../Builds/$BUILD_TARGET
- cd ..
pack_windows:
extends: .pack
pack_all:
stage: pack
only:
- tags
tags:
- linux
variables:
BUILD_TARGET: StandaloneWindows64
platform: win32
dependencies:
- StandaloneWindows64
- resources
appVersion: $CI_COMMIT_TAG
username: $MYCARD_USERNAME
password: $MYCARD_PASSWORD
script:
- apt update
- apt -y install curl git wget tar zstd jq
- git clone https://code.moenext.com/mycard/mycard-package-script.git mycard-package-script
- |
set -e
pack_linux:
extends: .pack
variables:
BUILD_TARGET: StandaloneLinux64
platform: linux
dependencies:
- StandaloneLinux64
- resources
for target in StandaloneWindows64 StandaloneOSX StandaloneLinux64; do
echo "=== Packing $target ==="
pack_macos:
extends: .pack
variables:
BUILD_TARGET: StandaloneOSX
platform: darwin
dependencies:
- StandaloneOSX
- resources
# 平台映射并导出给 index.sh 使用
case "$target" in
StandaloneWindows64) platform=win32 ;;
StandaloneOSX) platform=darwin ;;
StandaloneLinux64) platform=linux ;;
*) echo "Unknown target: $target" >&2; exit 1 ;;
esac
export platform
export BUILD_TARGET="$target" # 若下游脚本需要可用
cd "Builds/$target"
# 统一 rsync 资源(存在才拷贝)
for res in Picture Deck Puzzle Data; do
src="../../$res"
if [ -d "$src" ]; then
mkdir -p "./$res"
rsync -a "$src/" "./$res"
fi
done
mkdir -p Replay
cd ../..
# 调用打包脚本(依赖 appVersion/username/password/platform/BUILD_TARGET)
./mycard-package-script/index.sh makeBuild mdpro3 "Builds/$target"
done
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