Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,13 @@ jobs:
found { print }
' CHANGELOG.md)"

# A pre-release tag (vX.Y.Z-rc.N) is a test build: it publishes as a GitHub
# pre-release and needs no CHANGELOG section of its own. A final tag still
# fails closed below.
if [ -z "$(printf '%s' "$SECTION" | tr -d '[:space:]')" ] && [[ "$VERSION" == *-* ]]; then
SECTION="Pre-release build ${GITHUB_REF_NAME}, for testing. It is not a release; the notes ship with the final v${VERSION%%-*} tag."
fi

# Fail closed. A tag whose version has no CHANGELOG section is a tag
# pointing at the wrong commit, or a release nobody wrote notes for —
# both are reasons to stop, not to publish auto-generated notes and
Expand Down
5 changes: 3 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,9 @@ or the upstream source instead.

- **A version tag is pushed only for final code.** `vX.Y.Z` marks a release, nothing else. To try a
release build first, push a pre-release tag, `vX.Y.Z-rc.N`, which uses up no release number. It runs
the same release workflow, so the tagged commit needs its own `## [X.Y.Z-rc.N]` CHANGELOG section
(the workflow refuses to publish without one), and it is published as a GitHub pre-release.
the same release workflow and publishes as a GitHub pre-release. It needs no CHANGELOG section of
its own: the workflow uses a `## [X.Y.Z-rc.N]` section when the commit has one, and a fixed
test-build note otherwise.
- **A public tag is never moved, deleted or reused.** Once a tag has been fetched, moving it makes
consumers of the same version disagree. Composer and npm git dependencies resolve the tag afresh, so
new installs get the moved commit while every existing lockfile and cache keeps the old one (an npm
Expand Down
6 changes: 3 additions & 3 deletions docs/release.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,9 +85,9 @@ issues refer to that earlier series.
A pushed `vX.Y.Z` tag is never moved, deleted or reused: once a tag has been fetched, lockfiles and
caches keep the commit it named while fresh installs resolve the moved one, so two consumers of the
same version run different code (and for a Go module, `sum.golang.org` makes the moved version fail
verification). Test a release with a pre-release tag (`vX.Y.Z-rc.N`), whose commit needs its own
`## [X.Y.Z-rc.N]` CHANGELOG section and which publishes as a GitHub pre-release. Retract a bad
release and fix it forward in the next version. The full rules are in
verification). Test a release with a pre-release tag (`vX.Y.Z-rc.N`): it publishes as a GitHub
pre-release, and needs no CHANGELOG section of its own. Retract a bad release and fix it forward in
the next version. The full rules are in
[CONTRIBUTING.md](../CONTRIBUTING.md#releases-and-versioning).

---
Expand Down
Loading