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
|
- name: Restrict GoReleaser to linux/arm64
|
||||||
run: |
|
run: |
|
||||||
|
yq -i '.project_name = "picoclaw"' .goreleaser.yaml
|
||||||
yq -i '.builds[0].goos = ["linux"]' .goreleaser.yaml
|
yq -i '.builds[0].goos = ["linux"]' .goreleaser.yaml
|
||||||
yq -i '.builds[0].goarch = ["arm64"]' .goreleaser.yaml
|
yq -i '.builds[0].goarch = ["arm64"]' .goreleaser.yaml
|
||||||
yq -i 'del(.builds[0].ignore)' .goreleaser.yaml
|
yq -i 'del(.builds[0].ignore)' .goreleaser.yaml
|
||||||
|
|
@ -61,7 +62,7 @@ jobs:
|
||||||
with:
|
with:
|
||||||
distribution: goreleaser
|
distribution: goreleaser
|
||||||
version: ~> v2
|
version: ~> v2
|
||||||
args: build --clean --snapshot
|
args: release --clean --snapshot
|
||||||
env:
|
env:
|
||||||
GOVERSION: ${{ steps.setup-go.outputs.go-version }}
|
GOVERSION: ${{ steps.setup-go.outputs.go-version }}
|
||||||
# Override GORELEASER_CURRENT_TAG agar binary terkompilasi dengan versi yang benar
|
# Override GORELEASER_CURRENT_TAG agar binary terkompilasi dengan versi yang benar
|
||||||
|
|
@ -71,14 +72,14 @@ jobs:
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: picoclaw-linux-arm64-${{ env.FORK_VERSION }}
|
name: picoclaw-linux-arm64-${{ env.FORK_VERSION }}
|
||||||
path: dist/*linux_arm64*/picoclaw*
|
path: dist/*.tar.gz
|
||||||
if-no-files-found: warn
|
if-no-files-found: warn
|
||||||
|
|
||||||
- name: Create GitHub Release
|
- name: Create GitHub Release
|
||||||
env:
|
env:
|
||||||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
run: |
|
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 }}" \
|
--title "Fork Build ${{ env.FORK_VERSION }}" \
|
||||||
--notes "Automated release from branch ${{ github.ref_name }}."
|
--notes "Automated release from branch ${{ github.ref_name }}."
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue