From f26703b8f9ddb31cf90b48ea42ab565f5b12f796 Mon Sep 17 00:00:00 2001 From: v-raymondsu Date: Mon, 18 May 2026 17:07:58 +0800 Subject: [PATCH] fix: Compressed the files into .zip and .tar.gz --- .github/workflows/cd.yml | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml index 1489140..9334231 100644 --- a/.github/workflows/cd.yml +++ b/.github/workflows/cd.yml @@ -30,6 +30,22 @@ jobs: run-id: ${{ github.event.workflow_run.id }} github-token: ${{ secrets.GITHUB_TOKEN }} + - name: Package artifacts + shell: bash + run: | + mkdir -p release-assets + shopt -s nullglob + for dir in artifacts/*; do + if [ -d "$dir" ]; then + name=$(basename "$dir") + if echo "$name" | grep -qi "windows"; then + (cd "$dir" && zip -r "../../release-assets/${name}.zip" .) + else + tar -czf "release-assets/${name}.tar.gz" -C "$dir" . + fi + fi + done + - name: Create release candidate uses: softprops/action-gh-release@v2 with: @@ -37,4 +53,4 @@ jobs: name: Release Candidate ${{ steps.version.outputs.tag }} prerelease: true generate_release_notes: true - files: artifacts/**/* + files: release-assets/*