Skip to content

The recommendation to "move" tags #214

@friederbluemle

Description

@friederbluemle

This is regarding the official Versioning documentation for authoring custom GitHub Actions.

I really had to read it several times to make sure that an "official" GitHub controlled repository is recommending to "move" tags between commits. 😨

Please, if you haven't already, read the section On Re-tagging in the official Git man page for the tag command. Specifically, "The insane thing" (point 2), and why "Git does not change tags behind users back".

These mechanisms are in place for a reason, and together with many other amazing things about Git, have contributed to the huge success and the way Git/GitHub have revolutionized version control and collaboration over the past decade. Please, don't try to circumvent them and recommend anti-patterns as best practices. This totally sends the wrong signal, especially to new users who are less familiar with Git. Do not force re-tag and force override already published tags.

All that said, most what is written in the Versioning documentation document makes sense, and is following best practices 👍 It seems like a solution that uses Git tags in the intended way with minimal change to what is already there could be:

  • Continue to use the master branch for ongoing development
  • Tag actual releases using standard semver tags (v1.0.0, v1.1.0)
  • Do not use "moving" tags
  • Use a branch v1 instead of releases/v1

A branch is the correct construct to point to different commits over time.

Example

Say v1 points to v1.0.0, and a new version v1.1.0 has been tagged. After successfully testing v1.1.0, v1 could simply be fast-forwarded to v1.1.0. There is no need to force anything, and from a user's perspective, everything remains the same, e.g. using an action would still look like this:

uses: actions/custom-action@v1

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions