You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add major version ref instructions to release documentation
Recommended practice for GitHub Actions
(https://help.github.com/en/actions/building-actions/about-actions#versioning-your-action) is to add a ref to the
repository for the major version, then update that ref on each release of that major version series. This allows users
of the action to configure their workflows to use the latest version of the action that won't introduce breaking
changes. Without this ref, the only options are:
- pin a fixed ref - this means either frequent maintenance of the workflow to keep it up to date, or more likely using
an outdated version of the action.
- reference the tip of the default branch, subjecting the workflow to an unstable version of the action which may
introduce bugs or breaking changes at any moment
Although GitHub recommends using a tag, my understanding is that it's not considered best practices to alter Git tags.
For this reason, I prefer using branch instead of a tag. There is no difference between the two as far as the usage of
the action in a GitHub Workflow is concerned. The commits would be pushed to the branch on every release.
I see GitHub even took the branch approach in one of the official actions:
https://github.com/octokit/request-action
Another prominent action using this approach:
https://github.com/ruby/setup-ruby
And our own (admittedly, I did it):
https://github.com/arduino/setup-protoc
0 commit comments