Commit 34ca88d
ci(release): keep image release on its own v* track (#1004)
* ci(release): keep image release on its own v* track
The release.yml resolver picked the newest release repo-wide via
`gh release list --limit 1`, with no prefix filter. When the separate
standalone-dmr track published `dmr-v0.1.0` (newest release overall),
the container-image release grabbed it and ran it through the v*
auto-bump logic. `${LATEST_TAG#v}` only strips a leading `v`, so
`dmr-v0.1.0` was mangled into the invalid tag `vdmr-v0.1.1`, which was
then baked into the server image, pushed as a git tag, and propagated
downstream — breaking verify-docker-ce (server `vdmr-v0.1.1` vs CE
client `v1.2.5`).
Restrict the resolver to this workflow's own strict-semver (vX.Y.Z)
scheme:
- filter the GitHub release lookup to `^v[0-9]+\.[0-9]+\.[0-9]+$`
- filter the git-tag fallback the same way (the `v*` glob also matched
stray tags like `vdmr-v0.1.1`)
- add a post-resolve guard that aborts prepare if RELEASE_TAG is not
valid vX.Y.Z, so a malformed tag can never reach the image build or
downstream release triggers
The standalone `dmr` binary continues to release independently via
release-dmr.yml on `dmr-v*` tags.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* ci(release): centralize semver pattern, harden release lookup
Address PR review feedback:
- Centralize the strict-semver pattern in a single RELEASE_TAG_PATTERN
variable, reused by the release lookup, git-tag fallback, explicit-tag
validation, and the final guard, so the rule can't drift between them.
- Make the git-tag fallback trigger on "no semver match found" (not just
"no releases exist"), covering the case where the newest 100 releases
are all off-track (e.g. a burst of dmr-v*) and the true latest vX.Y.Z
release falls outside the release-list window. git tag is unbounded, so
it always finds the real latest semver tag.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* ci(release): surface gh failures and fix pipefail in tag fallback
Address second-pass review feedback:
- Stop swallowing `gh release list` stderr with `2>/dev/null`. Capture it
and, on failure, emit a `::warning::` before falling back to git tags,
so a broken release lookup is visible in the logs instead of silently
degrading.
- Document why `--limit 100` is sufficient (the unbounded git-tag
fallback backstops the window).
- Fix a pipefail hazard the previous commit introduced: under the default
`bash -eo pipefail` shell, a no-match `grep` in the git-tag fallback
exits non-zero and would abort the step (breaking the legitimate
"fresh repo, no tags -> start at v0.1.0" path). Wrap it in
`{ grep ... || true; }`.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>1 parent 362c7f6 commit 34ca88d
1 file changed
Lines changed: 45 additions & 11 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
63 | 63 | | |
64 | 64 | | |
65 | 65 | | |
66 | | - | |
67 | | - | |
68 | | - | |
69 | | - | |
70 | | - | |
71 | | - | |
72 | | - | |
| 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 | + | |
73 | 100 | | |
74 | 101 | | |
75 | 102 | | |
76 | 103 | | |
77 | | - | |
78 | | - | |
79 | | - | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
80 | 107 | | |
81 | 108 | | |
82 | 109 | | |
83 | 110 | | |
84 | | - | |
| 111 | + | |
85 | 112 | | |
86 | 113 | | |
87 | 114 | | |
| |||
127 | 154 | | |
128 | 155 | | |
129 | 156 | | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
130 | 164 | | |
131 | 165 | | |
132 | 166 | | |
| |||
0 commit comments