Skip to content

Commit 6126f72

Browse files
committed
Shift the latest tag to the commit used to build the binaries.
1 parent 5ca00bc commit 6126f72

File tree

1 file changed

+18
-1
lines changed

1 file changed

+18
-1
lines changed

.github/workflows/build.yaml

+18-1
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,27 @@ jobs:
3434
- name: Run tests
3535
run: go test -v
3636

37-
build:
37+
retag:
3838
runs-on: ubuntu-latest
3939
needs: test
4040
if: github.ref == 'refs/heads/master'
41+
42+
steps:
43+
- name: Shift tag
44+
uses: actions/github-script@v7
45+
with:
46+
script: |
47+
github.rest.git.updateRef({
48+
owner: context.repo.owner,
49+
repo: context.repo.repo,
50+
ref: 'tags/latest',
51+
sha: context.sha
52+
});
53+
54+
build:
55+
runs-on: ubuntu-latest
56+
needs: retag
57+
if: github.ref == 'refs/heads/master'
4158
strategy:
4259
matrix:
4360
os: [ linux, darwin ]

0 commit comments

Comments
 (0)