Skip to content

Commit b519b7c

Browse files
authored
Merge pull request #28 from actions/docs/immutable-release-process
Document immutable release process
2 parents 46ffb21 + 1f6d0c8 commit b519b7c

1 file changed

Lines changed: 39 additions & 0 deletions

File tree

‎RELEASES.md‎

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
# Releasing
2+
3+
> [!CAUTION]
4+
> **NEVER PUBLISH A GITHUB RELEASE FOR A SHORTENED VERSION TAG SUCH AS `v1`, `v2`, `v1.4`, OR `v2.3`.**
5+
>
6+
> These are movable aliases. Publishing an immutable release for one would permanently prevent that tag from being moved or reused, even if the release is deleted.
7+
>
8+
> GitHub releases must use a complete version tag matching `vMAJOR.MINOR.PATCH`, for example:
9+
>
10+
> - `v1.4.3`
11+
> - `v2.0.0`
12+
> - `v12.6.1`
13+
14+
## Release process
15+
16+
1. Confirm the intended commit is on `main` and all checks pass.
17+
2. Draft a GitHub release using a new `vMAJOR.MINOR.PATCH` tag.
18+
3. Verify the tag, target commit, and release notes.
19+
4. Publish the release. The complete version tag will become immutable.
20+
5. Move the corresponding major-version tag to the released commit.
21+
22+
```bash
23+
VERSION=v1.4.3
24+
MAJOR="${VERSION%%.*}" # v1.4.3 -> v1
25+
26+
git fetch --tags
27+
git tag --force "$MAJOR" "${VERSION}^{}"
28+
git push origin "refs/tags/$MAJOR" --force
29+
```
30+
31+
6. Verify that both tags resolve to the same commit.
32+
33+
```bash
34+
git fetch --tags --force
35+
git rev-parse "$MAJOR"
36+
git rev-parse "${VERSION}^{}"
37+
```
38+
39+
Do not create releases retroactively for existing tags. Start with the next version.

0 commit comments

Comments
 (0)