ci: add RC prerelease and release-branch workflows#2
Open
spbsoluble wants to merge 4 commits intomainfrom
Open
ci: add RC prerelease and release-branch workflows#2spbsoluble wants to merge 4 commits intomainfrom
spbsoluble wants to merge 4 commits intomainfrom
Conversation
Replaces tag-push-triggered release with branch-push trigger on release-* branches. Adds pr-prerelease.yml to auto-tag vX.Y.Z-rc.N on each push to a PR targeting release-*, and rewrites release.yml to create vX.Y.Z on merge/push to release-*.
20b4371 to
3b1765c
Compare
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
pr-prerelease.yml: on each push to a PR targeting arelease-X.Ybranch, automatically computes and pushes avX.Y.Z-rc.Ntag (0-based, increments per push) and publishes a GitHub prerelease + NuGet packagerelease.yml: triggers onpushtorelease-*branches (i.e. on merge) instead ofpushtov*tags — necessary because tags created byGITHUB_TOKENinside a workflow do not re-trigger other workflowsrelease-X.Y, createsvX.Y.Zrelease tag where Z = latest non-RC patch + 1scripts/test-semver.sh: standalone bash script that tests the version computation logic from both workflows without requiring a git repo, network access, or any commitsVersion logic
v1.0.0, PR opened intorelease-1.0v1.0.1-rc.0v1.0.1-rc.1v1.0.1v1.0.2-rc.0Test coverage (
scripts/test-semver.sh)X.Y— tags from other majors/minors are invisiblesort -Vhandles double-digit patch numbers correctly (9 → 10, not lexicographic)release-1.2withv2.0.xtags present producesv1.2.x-rc.0, not av2.xtagTest plan
release-X.Ybranch and confirmvX.Y.Z-rc.0tag and prerelease are createdvX.Y.Z-rc.1is createdvX.Y.Zrelease tag and full release are createdbash scripts/test-semver.shand confirm all 23 tests pass