Commit 58ac708
authored
feat(build)!: derive the version from git, and adopt the verified release flow (#77)
* feat(build)!: derive the version from git, and adopt the verified release 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>
* fix(ci): point the semantic-PR check at a ref that has the workflow
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>
* fix(release): pass version-format to the tag job
common-release-tag.yml now validates the version and the ref itself rather than
trusting that prepare validated the same values (CodeQL flagged the privileged
checkout on an unvalidated ref in reqstool/.github#66). Validating the version
needs to know which format to validate against.
Signed-off-by: Jimisola Laursen <jimisola@jimisola.com>
---------
Signed-off-by: Jimisola Laursen <jimisola@jimisola.com>1 parent 45cca38 commit 58ac708
6 files changed
Lines changed: 140 additions & 51 deletions
File tree
- .github/workflows
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
3 | 17 | | |
4 | 18 | | |
5 | 19 | | |
| |||
21 | 35 | | |
22 | 36 | | |
23 | 37 | | |
| 38 | + | |
| 39 | + | |
24 | 40 | | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
25 | 46 | | |
26 | 47 | | |
27 | 48 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | | - | |
| 13 | + | |
This file was deleted.
This file was deleted.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
8 | | - | |
9 | | - | |
10 | | - | |
11 | | - | |
12 | | - | |
13 | | - | |
14 | | - | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
15 | 11 | | |
16 | 12 | | |
17 | 13 | | |
18 | | - | |
19 | 14 | | |
20 | 15 | | |
21 | 16 | | |
| |||
0 commit comments