Skip to content

Refuse a tag of another release line - #300

Merged
abashev merged 1 commit into
21.X.Xfrom
abashev/refuse-tags-of-other-lines
Nov 30, 2026
Merged

abashev merged 1 commit into
21.X.Xfrom
abashev/refuse-tags-of-other-lines

Conversation

@abashev

@abashev abashev commented Nov 30, 2026

Copy link
Copy Markdown
Collaborator

Before this PR

A tag runs the release workflow of the commit it points at, and release.yml releases whatever version the tag names. With the 17 line coming (#293), a 17.x tag pushed onto a commit of 21.X.X by 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

  • The release notes job first refuses a tag that is not a 21.*, with an error that names the line's tags.
  • jars, native-images and wasm wait for it, so every job of the workflow waits for the check, and a wrong tag builds and uploads nothing.
  • The workflow's header says so, and that a line cut from this one changes the pattern. The 17 line does the same for 17.* in Release the 17 line by tag, with notes for 17.1.0 and its README #299.

Checked: zizmor finds nothing, act --dryrun passes the jobs it can run, and the pattern takes 21.1.3 and 21.2.0.1 and refuses 17.1.0 and 2.98.0.

Possible downsides?

  • The jars, native-image and WebAssembly jobs start some seconds later, after the release notes are rendered; if GitHub's Markdown API fails there, nothing starts until that job is re-run.

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.
@abashev
abashev merged commit 40cbbd5 into 21.X.X Nov 30, 2026
11 checks passed
@abashev
abashev deleted the abashev/refuse-tags-of-other-lines branch November 30, 2026 20:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant