Skip to content

Commit

Permalink
Shift the latest tag to the commit used to build the binaries.
Browse files Browse the repository at this point in the history
  • Loading branch information
LTLA committed Oct 21, 2024
1 parent 5ca00bc commit 6126f72
Showing 1 changed file with 18 additions and 1 deletion.
19 changes: 18 additions & 1 deletion .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,27 @@ jobs:
- name: Run tests
run: go test -v

build:
retag:
runs-on: ubuntu-latest
needs: test
if: github.ref == 'refs/heads/master'

steps:
- name: Shift tag
uses: actions/github-script@v7
with:
script: |
github.rest.git.updateRef({
owner: context.repo.owner,
repo: context.repo.repo,
ref: 'tags/latest',
sha: context.sha
});
build:
runs-on: ubuntu-latest
needs: retag
if: github.ref == 'refs/heads/master'
strategy:
matrix:
os: [ linux, darwin ]
Expand Down

0 comments on commit 6126f72

Please sign in to comment.