Skip to content

Commit

Permalink
Only shift the latest tag once across all build strategies.
Browse files Browse the repository at this point in the history
  • Loading branch information
LTLA committed Oct 21, 2024
1 parent 51dc679 commit 0013f8d
Showing 1 changed file with 14 additions and 8 deletions.
22 changes: 14 additions & 8 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,19 +34,12 @@ jobs:
- name: Run tests
run: go test -v

build:
retag:
runs-on: ubuntu-latest
needs: test
if: github.ref == 'refs/heads/master'
strategy:
matrix:
os: [ linux, darwin ]
arch: [ amd64, arm64 ]

steps:
- name: Check out
uses: actions/checkout@v4

- name: Shift tag
uses: actions/github-script@v7
with:
Expand All @@ -58,6 +51,19 @@ jobs:
sha: context.sha
});
build:
runs-on: ubuntu-latest
needs: retag
if: github.ref == 'refs/heads/master'
strategy:
matrix:
os: [ linux, darwin ]
arch: [ amd64, arm64 ]

steps:
- name: Check out
uses: actions/checkout@v4

- name: Build latest
uses: wangyoucao577/go-release-action@v1
with:
Expand Down

0 comments on commit 0013f8d

Please sign in to comment.