Merge branch 'fix/artifacts-workspace' of sarman/tftsr-devops_investigation into master

This commit is contained in:
Shaun Arman 2026-03-15 23:13:27 +00:00 committed by Gogs
commit 0e47ccd2b9

View File

@ -27,8 +27,8 @@ pipeline:
- rustup target add $TARGET - rustup target add $TARGET
- cargo install tauri-cli --version "^2" --locked - cargo install tauri-cli --version "^2" --locked
- CI=true cargo tauri build --target $TARGET - CI=true cargo tauri build --target $TARGET
- mkdir -p /artifacts/linux-amd64 - mkdir -p artifacts/linux-amd64
- find src-tauri/target/$TARGET/release/bundle -name "*.deb" -o -name "*.rpm" -o -name "*.AppImage" | xargs -I{} cp {} /artifacts/linux-amd64/ - find src-tauri/target/$TARGET/release/bundle -name "*.deb" -o -name "*.rpm" -o -name "*.AppImage" | xargs -I{} cp {} artifacts/linux-amd64/
upload-release-linux: upload-release-linux:
image: curlimages/curl:latest image: curlimages/curl:latest
@ -51,8 +51,8 @@ pipeline:
RELEASE_ID=$(curl -sf "$API/repos/$REPO/releases/tags/$TAG" \ RELEASE_ID=$(curl -sf "$API/repos/$REPO/releases/tags/$TAG" \
-H "Authorization: token $GOGS_TOKEN" | grep -o '"id":[0-9]*' | head -1 | cut -d: -f2) -H "Authorization: token $GOGS_TOKEN" | grep -o '"id":[0-9]*' | head -1 | cut -d: -f2)
# Upload amd64 artifacts # Upload amd64 artifacts from workspace
for f in /artifacts/linux-amd64/*; do for f in artifacts/linux-amd64/*; do
[ -f "$f" ] && curl -sf -X POST "$API/repos/$REPO/releases/$RELEASE_ID/assets" \ [ -f "$f" ] && curl -sf -X POST "$API/repos/$REPO/releases/$RELEASE_ID/assets" \
-H "Authorization: token $GOGS_TOKEN" \ -H "Authorization: token $GOGS_TOKEN" \
-F "attachment=@$f;filename=$(basename $f)" || echo "Upload failed: $f" -F "attachment=@$f;filename=$(basename $f)" || echo "Upload failed: $f"