From f41d20b78797b13bc0e3ccec939451f98fcc5324 Mon Sep 17 00:00:00 2001 From: "Patrick J. Roddy" Date: Tue, 22 Oct 2024 13:49:40 +0100 Subject: [PATCH] Update release.yaml I've changed `github.sha` to `github.ref_name`. - `github.sha` points to the current commit SHA in the workflow - `github.ref_name` will contain the tag name of the release This ensures the latest tag points to the same commit as the release tag, rather than potentially pointing to a different commit that triggered the workflow. This is especially important if you create releases through the GitHub UI, where you might select an older commit to create the release from. --- .github/workflows/release.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 2b9da3b7..af48d776 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -24,5 +24,5 @@ jobs: run: |- git config user.name github-actions git config user.email github-actions@github.com - git tag --force ${{ env.TAG_NAME }} ${{ github.sha }} + git tag --force ${{ env.TAG_NAME }} ${{ github.ref_name }} git push origin ${{ env.TAG_NAME }} --force