Repository navigation
Refuse a tag of another release line - #300
Merged
Merged
Conversation
A tag runs the release workflow of the commit it points at. With the 17 line out (#293), a 17.x tag on a commit of 21.X.X would publish the 21 line's jars, native images and plugins under a version of the 17 line, and neither Maven Central nor the JetBrains Marketplace takes a version back. The release notes job now refuses a tag that is not a 21.x first, and the jobs that started at once, the jars, the native images and the WebAssembly module, wait for it, so a wrong tag builds and uploads nothing. 17.X.X refuses a tag that is not a 17.x the same way.
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.
Before this PR
A tag runs the release workflow of the commit it points at, and
release.ymlreleases whatever version the tag names. With the 17 line coming (#293), a 17.x tag pushed onto a commit of21.X.Xby mistake would publish the 21 line's jars, native images, Gradle plugins and IntelliJ plugin under a version of the 17 line. Maven Central, the Gradle Plugin Portal and the JetBrains Marketplace never take a version back. The jars, native-image and WebAssembly jobs also start at once, before any check.After this PR
21.*, with an error that names the line's tags.jars,native-imagesandwasmwait for it, so every job of the workflow waits for the check, and a wrong tag builds and uploads nothing.17.*in Release the 17 line by tag, with notes for 17.1.0 and its README #299.Checked: zizmor finds nothing,
act --dryrunpasses the jobs it can run, and the pattern takes21.1.3and21.2.0.1and refuses17.1.0and2.98.0.Possible downsides?