When publishing a new version of a GitHub Action to the Marketplace, what is the recommended way to maintain the major version tag (e.g., v2) pointing to the latest minor/patch?
Select an answer to reveal the explanation.
Short Explanation and Infographic
Action maintainers deliberately force-push major version tags like v2 to point to the latest v2.x.x release — that's how @v2 stays current.
Full explanation below image
Full Explanation
The conventional pattern for action versioning: (1) Create full semantic version tags like 'v2.3.1' for each release; (2) Force-push the major version tag 'v2' to point to the same commit as 'v2.3.1'. This allows users referencing '@v2' to get automatic minor/patch updates, while still being able to pin to '@v2.3.1' for reproducibility. 'action.yml' has no 'version' field. Creating separate repositories per version is excessive overhead. GitHub does not automatically move tags — the action author must manually force-push the floating tag.