Skip to content

Commit

Permalink
Avoid redundant shifting of the latest tag for each build strategy.
Browse files Browse the repository at this point in the history
  • Loading branch information
LTLA committed Oct 21, 2024
1 parent 6c1e621 commit 416d34c
Showing 1 changed file with 14 additions and 9 deletions.
23 changes: 14 additions & 9 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,19 +42,11 @@ jobs:
./SewerRat &
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 @@ -66,6 +58,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 416d34c

Please sign in to comment.