Skip to content

Commit 6c75068

Browse files
committed
Include Linux amd64 and arm64 binaries in release assets
1 parent 6a9f59f commit 6c75068

File tree

1 file changed

+11
-17
lines changed

1 file changed

+11
-17
lines changed

.github/workflows/release.yml

Lines changed: 11 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ on:
44
tags:
55
- v*
66

7+
permissions:
8+
contents: write
9+
710
jobs:
811
build:
912
runs-on: ubuntu-latest
@@ -23,21 +26,12 @@ jobs:
2326
run: |
2427
GOOS=linux GOARCH=amd64 CGO_ENABLED=0 go build \
2528
-trimpath -ldflags="-s -w -X=main.explicitVersion=${GITHUB_REF##*/}" -o bitmapist-server
26-
GZIP=-9 tar czvf bitmapist-server-linux-amd64.tar.gz bitmapist-server
27-
- name: Create release
28-
id: create_release
29-
uses: actions/create-release@v1
30-
env:
31-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
32-
with:
33-
tag_name: ${{ github.ref }}
34-
release_name: ${{ github.ref }}
35-
- name: Upload artifact
36-
uses: actions/upload-release-asset@v1.0.1
37-
env:
29+
tar czvf bitmapist-server-linux-amd64.tar.gz bitmapist-server
30+
31+
GOOS=linux GOARCH=arm64 CGO_ENABLED=0 go build \
32+
-trimpath -ldflags="-s -w -X=main.explicitVersion=${GITHUB_REF##*/}" -o bitmapist-server
33+
tar czvf bitmapist-server-linux-arm64.tar.gz bitmapist-server
34+
- env:
3835
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
39-
with:
40-
upload_url: ${{ steps.create_release.outputs.upload_url }}
41-
asset_path: ./bitmapist-server-linux-amd64.tar.gz
42-
asset_name: bitmapist-server-linux-amd64.tar.gz
43-
asset_content_type: application/gzip
36+
run: |
37+
gh release create ${{ github.ref }} bitmapist-server-*.tar.gz

0 commit comments

Comments
 (0)