fix(release): pin release tag to commit, refuse 1.x, add prerelease input - #37
Merged
Merged
Conversation
…nput Ports the hotfix/1.4.x release-script fixes to dev, adapted to 2.x naming: - gh release create now gets --target <release commit>, so the tag lands on that commit instead of the default branch (dev). - The changelog is now built from the last tag reachable from HEAD, not the newest tag in the repo (which could be off another line, e.g. 1.x). - The release zip's contents are verified from a single listing before anything is committed or published, and a stray database.json now fails the build instead of shipping. - An existing tag is refused whether it's local or already on origin. - dev now refuses to release a 1.x version (1.x releases come from hotfix/1.4.x), and refuses to run from a detached HEAD. Also adds a `prerelease` workflow_dispatch input (default false), passed through as PRERELEASE to release.sh: true builds with --prerelease and skips --latest, so a release (e.g. 2.0.0) can ship without touching what "latest" points to. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Ports the fixes from
hotfix/1.4.x'srelease.shback todev, adapted to the 2.x layout (AutoTournamentCS2naming,addons/+cfg/at the zip root).--targetongh release create: without it, the tag is created on the default branch (dev) instead of on the actual release commit.git tag --sort=-v:refname(newest tag anywhere in the repo) togit tag --merged HEAD --sort=-v:refname, so a tag on another line (e.g. ahotfix/1.4.x1.x tag) can't be picked up as the changelog's starting point.unzip -Z1listing instead of two separateunzip -lcalls, and the zip now also fails the build if it contains a straydatabase.json(which must never ship, since it holds the operator's DB config).git ls-remote --tags origin, so a tag that's on GitHub but not fetched locally still blocks the release.devnow refuses to release a1.xversion (that'shotfix/1.4.x's job), and refuses to run from a detached HEAD.New:
prereleaseinputAdds a
prereleaseboolean input to theReleaseworkflow (defaultfalse), passed through torelease.shasPRERELEASE. When true, the script publishes with--prereleaseand skips--latest, so a release (e.g. the upcoming2.0.0) can go out without touching what GitHub's "latest" release points to.Test plan
bash -n release.shpasseshotfix/1.4.x's fixes, adapted to 2.x