From 3e51815790d17e82c0cb3dff4fbb841717bb54ce Mon Sep 17 00:00:00 2001 From: Boris Quiroz Date: Sat, 26 Jul 2025 22:59:42 -0400 Subject: [PATCH 1/2] Fix go version --- .github/workflows/go.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index 914109c..ab60734 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -19,7 +19,7 @@ jobs: - name: Set up Go uses: actions/setup-go@v4 with: - go-version: '1.20' + go-version: '1.23' - name: Build run: | From dbf45308ffe1ec0c20098a7f8db4393fc1410b95 Mon Sep 17 00:00:00 2001 From: Boris Quiroz Date: Sat, 26 Jul 2025 23:09:41 -0400 Subject: [PATCH 2/2] split jobs: build and release --- .github/workflows/go.yml | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index ab60734..b93b96d 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -1,13 +1,8 @@ -# This workflow will build a golang project -# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-go - -name: Go +name: Go build and release on: push: branches: [ "main" ] - pull_request: - branches: [ "main" ] jobs: @@ -26,7 +21,13 @@ jobs: GOOS=linux GOARCH=amd64 go build -v -o pretend-linux-amd64 GOOS=darwin GOARCH=amd64 go build -v -o pretend-darwin-amd64 GOOS=darwin GOARCH=arm64 go build -v -o pretend-darwin-arm64 - + + release: + runs-on: ubuntu-latest + needs: build + if: startsWith(github.ref, 'refs/tags/') + steps: + - uses: actions/checkout@v4 - name: Create Github Release and updaload assets uses: softprops/action-gh-release@v2 with: