Skip to content

Commit

Permalink
ci(release): modify workflow to bundle build artifacts into zip files
Browse files Browse the repository at this point in the history
  • Loading branch information
AlbinoGeek committed Jun 22, 2024
1 parent aca1d5f commit 2b074f0
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:

- name: Build ${{ matrix.package }} for ${{ matrix.os }} (${{ matrix.arch }})
run: |
outfile=${{ matrix.package }}-${{ matrix.os }}-${{ matrix.arch }}
outfile=${{ matrix.package }}
if [ "${{ matrix.os }}" = "windows" ]; then
outfile="${outfile}.exe"
fi
Expand All @@ -43,13 +43,17 @@ jobs:
-o "build/$outfile" \
./cmd/${{ matrix.package }}
- name: Bundle
run: 7z a -tzip "${{ matrix.package }}-${{ matrix.os }}-${{ matrix.arch }}.zip" \
"build/${{ matrix.package }}*"

- name: Archive build artifact
uses: actions/upload-artifact@v4
with:
compression-level: 0
if-no-files-found: error
name: ${{ matrix.package }}-${{ matrix.os }}-${{ matrix.arch }}
path: build/${{ matrix.package }}-${{ matrix.os }}-${{ matrix.arch }}*
path: ${{ matrix.package }}-${{ matrix.os }}-${{ matrix.arch }}.zip

release:
name: Release
Expand Down

0 comments on commit 2b074f0

Please sign in to comment.