From 6126f72e17ed9f9f9754d5aa29c04f0208a5b32e Mon Sep 17 00:00:00 2001 From: LTLA Date: Mon, 21 Oct 2024 09:15:37 -0700 Subject: [PATCH] Shift the latest tag to the commit used to build the binaries. --- .github/workflows/build.yaml | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index dc41e24..787a4d1 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -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 ]