ci: fix artifact path

This commit is contained in:
Syahdan 2025-10-15 11:59:18 +07:00
parent 5e59037543
commit c175c26518

View File

@ -21,10 +21,6 @@ jobs:
matrix: matrix:
goos: [linux, darwin, windows] goos: [linux, darwin, windows]
goarch: [amd64, arm64] goarch: [amd64, arm64]
include:
- goos: linux
goarch: arm
goarm: "7"
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v4 uses: actions/checkout@v4
@ -70,30 +66,8 @@ jobs:
go build -trimpath -ldflags="-s -w -X 'main.version=${V}'" \ go build -trimpath -ldflags="-s -w -X 'main.version=${V}'" \
-o "$BIN" "$ENTRY_PATH" -o "$BIN" "$ENTRY_PATH"
# package into OS-appropriate archive echo "Built and packaged: dist/"
if [ "${{ matrix.goos }}" = "windows" ]; then echo "$(ls -lh "dist")"
zip -j "dist/${ARCHIVE_BASE}.zip" "$BIN"
rm -f "$BIN"
else
tar -C dist -czf "dist/${ARCHIVE_BASE}.tar.gz" "$(basename "$BIN")"
rm -f "$BIN"
fi
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: binaries-${{ github.run_id }}-${{ github.sha }}
path: ./path/to/artifact
release:
needs: build
runs-on: ubuntu-latest
steps:
- name: Download artifacts
uses: actions/download-artifact@v4
with:
name: binaries-${{ needs.build.outputs.version }}
path: dist
- name: Create GitHub Release with binaries - name: Create GitHub Release with binaries
uses: softprops/action-gh-release@v2 uses: softprops/action-gh-release@v2