feat(build)!: derive the version from git, and adopt the verified release flow - #77
Open
jimisola wants to merge 2 commits into
Open
feat(build)!: derive the version from git, and adopt the verified release flow#77jimisola wants to merge 2 commits into
jimisola wants to merge 2 commits into
Conversation
…ease flow
The old arrangement created a draft, a human clicked Publish, and only then did
the publish workflows run -- so everything that verified a release ran after it
was already public. The release is now created as a prerelease and promoted only
once everything that can fail has succeeded; the confirmation step is an
environment approval on the job that tags, reached after lint and build are
already green.
The version no longer has to be typed: it is auto-detected from Conventional
Commits, and passing one that disagrees needs `force`. `prerelease: rc` cuts a
release candidate, verified exactly like a release but never promoted to latest.
See RELEASING.md in reqstool/.github for the whole flow.
Replaces axion-release with git-dyn-semver. Both derive the version from git
tags, so this is not a change of principle -- it is the same plugin the rest of
the org's Gradle builds will use, and it applies Conventional Commits bump logic
to compute the next version rather than only reading the last tag. Pure JGit, no
git CLI required.
Verified locally -- tagging 9.9.9 makes `./gradlew printVersion` print exactly
9.9.9; off-tag it yields {next}-{distance}-SNAPSHOT.
`./gradlew publishPlugins` builds from the tag itself, so the release flow has no
separate build-and-attach step. `java-publish-to-gradle.yml` asserts the resolved
version matches the tag before publishing, which catches the one failure that
matters here: a shallow clone, which makes the plugin compute a version rather
than fail.
BREAKING CHANGE: the version is now computed by a different plugin. An off-tag
build's version string changes shape (git-dyn-semver's
{next}-{distance}-SNAPSHOT, not axion-release's). Tagged builds are unaffected.
Signed-off-by: Jimisola Laursen <jimisola@jimisola.com>
check-semantic-pr.yml pinned common-check-semantic-pr.yml at e1d67194373e4da7ccfdf400f46201f18ca14f23. That commit predates the file: the `common-` rename came later, so the pinned tree has no such workflow. GitHub cannot resolve a workflow_call to a path that does not exist, so the run failed at startup with no jobs -- and because that produces no check run, it never appeared in the PR checks list. PR titles have therefore not been validated here since the pin was written. Following @main, as the other callers do, until the org settles on re-pinning. Signed-off-by: Jimisola Laursen <jimisola@jimisola.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.
What & Why
Migrates this repo to the reworked org release flow in
reqstool/.github#66.
The old arrangement stopped at a draft. A human clicked Publish, and only then did
the publish workflows run — so everything that verified a release ran after it was already
public, and a failure meant a bad release was live.
Now the release is created as a prerelease and promoted only once everything that can
fail has succeeded. A prerelease rather than a draft because a draft is invisible to the
verification too (
/releases/tags/<tag>404s unauthenticated), while a prerelease isreadable by exact tag and still excluded from
/releases/latest.The confirmation step is an environment approval on the job that tags, reached after
lint and build are already green — so a reviewer approves something verified rather than a
version string.
The version is no longer typed by hand. It is auto-detected from Conventional Commits;
passing one that disagrees requires
force, which is the guard that catches "meant 0.3.0,typed 0.2.0" before it becomes a tag.
prerelease: rccuts a release candidate — verifiedexactly like a release, but never promoted to latest.
dry-rundefaults to on: dispatching Release shows the resolved version, the generatednotes, and the raw commits they came from, without tagging or creating anything.
See
RELEASING.mdfor thefull flow.
Author checklist
actionlintcleanTest Plan
Merge order matters: this cannot merge before reqstool/.github#66. The workflows it
calls do not exist on
mainuntil that lands.After merging:
dry-runleft on. Confirm the job summary shows the resolvedversion, the notes, and the commit list — and that no tag or release exists afterwards.
prerelease: rcanddry-runoff. Confirm it pauses for approval, thenproduces a prerelease with its artifacts attached, and that
/releases/latestisunchanged.
prerelease: none.Note on pinning
Workflows are referenced at
@mainrather than a commit SHA, because the SHA does not existuntil #66 is squash-merged. Re-pinning to that SHA is a follow-up.
The version now comes from git
Replaces
axion-releasewithio.github.jimisola.git-dyn-semver. Both derive the version from git tags, so this is not a change of principle — it is the plugin the rest of the org’s Gradle builds use, and it applies Conventional Commits bump logic to compute the next version rather than only reading the last tag. Pure JGit, no git CLI required.Verified locally: tagging
9.9.9makes./gradlew printVersionprint exactly9.9.9; off-tag it yields{next}-{distance}-SNAPSHOT../gradlew publishPluginsbuilds from the tag itself, so the release flow has no separate build-and-attach step.java-publish-to-gradle.ymlasserts the resolved version matches the tag before publishing, which catches the one failure that matters here: a shallow clone, which makes the plugin compute a version rather than fail.