From 34da7400f29d1784753e464b86cdc8f501bc3394 Mon Sep 17 00:00:00 2001 From: Eguzki Astiz Lezaun Date: Wed, 22 Nov 2023 18:16:28 +0100 Subject: [PATCH 1/4] publish binary on release --- .github/workflows/release.yaml | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 .github/workflows/release.yaml diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml new file mode 100644 index 0000000..8e524a7 --- /dev/null +++ b/.github/workflows/release.yaml @@ -0,0 +1,20 @@ +--- +on: + release: + types: [created] + +permissions: + contents: write + packages: write + +jobs: + release-linux-amd64: + name: release linux/amd64 + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: wangyoucao577/go-release-action@v1 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + goos: linux + goarch: amd64 From d60cf5f5e2a7b5a26ff97719a0e98558b68c600c Mon Sep 17 00:00:00 2001 From: Eguzki Astiz Lezaun Date: Wed, 22 Nov 2023 19:31:56 +0100 Subject: [PATCH 2/4] fix release github action --- .github/workflows/release.yaml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 8e524a7..6a504ff 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -1,4 +1,7 @@ --- + +name: Release + on: release: types: [created] @@ -18,3 +21,4 @@ jobs: github_token: ${{ secrets.GITHUB_TOKEN }} goos: linux goarch: amd64 + goversion: go1.21.4 From 7b4c4fac50a4b3dee9cf452c0443f3c9a0b799e4 Mon Sep 17 00:00:00 2001 From: Eguzki Astiz Lezaun Date: Wed, 22 Nov 2023 19:37:27 +0100 Subject: [PATCH 3/4] fix go version --- .github/workflows/release.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 6a504ff..28e14f2 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -21,4 +21,4 @@ jobs: github_token: ${{ secrets.GITHUB_TOKEN }} goos: linux goarch: amd64 - goversion: go1.21.4 + goversion: 1.21.4 From 0e806469b82d16080d99b7654189c6170b39754e Mon Sep 17 00:00:00 2001 From: Eguzki Astiz Lezaun Date: Thu, 23 Nov 2023 11:10:44 +0100 Subject: [PATCH 4/4] build and publish in parallel: linux/amd64, linux/arm64, darwin/amd64, darwin/arm64 --- .github/workflows/release.yaml | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 28e14f2..d667e88 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -11,14 +11,19 @@ permissions: packages: write jobs: - release-linux-amd64: - name: release linux/amd64 + release-matrix: + name: Release Go Binary runs-on: ubuntu-latest + strategy: + matrix: + # build and publish in parallel: linux/amd64, linux/arm64, darwin/amd64, darwin/arm64 + goos: [linux, darwin] + goarch: [amd64, arm64] steps: - uses: actions/checkout@v3 - uses: wangyoucao577/go-release-action@v1 with: github_token: ${{ secrets.GITHUB_TOKEN }} - goos: linux - goarch: amd64 + goos: ${{ matrix.goos }} + goarch: ${{ matrix.goarch }} goversion: 1.21.4