-
Notifications
You must be signed in to change notification settings - Fork 6
Change to github.ref_name
for latest
flag
#472
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fine for me, but I thought SHA would work...
Should we mention the label in the CONTRIBUTING? I'd say probably not... just for the sake getting bogged down. |
It does, but is |
Yeah I reckon not worth it |
I think in GitHub's terminology 'commit that triggered the workflow' has a meaning which is dependent on the triggering event and for the |
Agreed |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approving as doesn't seem like there is any downside to this change!
I've changed
github.sha
togithub.ref_name
.github.sha
points to the current commit SHA in the workflowgithub.ref_name
will contain the tag name of the releaseThis 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.