ci(actions): package arm64 binary as tar.gz with picoclaw naming
This commit updates the GoReleaser arguments from 'build' to 'release' (with --snapshot), instructing GoReleaser to properly package the compiled binaries along with README files into a '.tar.gz' archive. Additionally, it explicitly sets the project name to 'picoclaw' using yq to ensure the executable inside the archive is named 'picoclaw' rather than adopting the '-fork' repo suffix. The upload steps now target the generated .tar.gz files.
This commit is contained in:
parent
029b562607
commit
125f2d3d34
1 changed files with 4 additions and 3 deletions
7
.github/workflows/build-arm64.yml
vendored
7
.github/workflows/build-arm64.yml
vendored
|
|
@ -52,6 +52,7 @@ jobs:
|
|||
|
||||
- name: Restrict GoReleaser to linux/arm64
|
||||
run: |
|
||||
yq -i '.project_name = "picoclaw"' .goreleaser.yaml
|
||||
yq -i '.builds[0].goos = ["linux"]' .goreleaser.yaml
|
||||
yq -i '.builds[0].goarch = ["arm64"]' .goreleaser.yaml
|
||||
yq -i 'del(.builds[0].ignore)' .goreleaser.yaml
|
||||
|
|
@ -61,7 +62,7 @@ jobs:
|
|||
with:
|
||||
distribution: goreleaser
|
||||
version: ~> v2
|
||||
args: build --clean --snapshot
|
||||
args: release --clean --snapshot
|
||||
env:
|
||||
GOVERSION: ${{ steps.setup-go.outputs.go-version }}
|
||||
# Override GORELEASER_CURRENT_TAG agar binary terkompilasi dengan versi yang benar
|
||||
|
|
@ -71,14 +72,14 @@ jobs:
|
|||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: picoclaw-linux-arm64-${{ env.FORK_VERSION }}
|
||||
path: dist/*linux_arm64*/picoclaw*
|
||||
path: dist/*.tar.gz
|
||||
if-no-files-found: warn
|
||||
|
||||
- name: Create GitHub Release
|
||||
env:
|
||||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
run: |
|
||||
gh release create "${{ env.FORK_VERSION }}" dist/*linux_arm64*/picoclaw* \
|
||||
gh release create "${{ env.FORK_VERSION }}" dist/*.tar.gz \
|
||||
--title "Fork Build ${{ env.FORK_VERSION }}" \
|
||||
--notes "Automated release from branch ${{ github.ref_name }}."
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue