Commit a7db3cf
committed
ci: Reconcile PEP 440 prerelease versions with semantic-release
semantic-release computes semver versions, but uv normalizes prerelease
versions to PEP 440 when cutting them, so the tag it produces (v3.0.0b1)
is not valid semver. semantic-release silently skips tags it cannot
parse, so every run on a prerelease branch reported the channel's first
prerelease as the next version and tried to cut a version that had
already been published.
Mirror each PEP 440 prerelease tag onto its semver equivalent before
running semantic-release. The mirrored tags are local to the workflow
run, so the PEP 440 tags stay the only real ones and continue to match
the published package version.
Recording the channel a prerelease went out on, which semantic-release
requires before it will treat a prerelease tag as released, stays in the
Version workflow where the release is cut. It now keys the note to the
PEP 440 tag that actually gets created, rather than to a semver tag name
that never exists, and derives the channel from the normalized version
so a release cut by hand is recorded the same way. Notes attach to
commits rather than tags, so the mirrored tag picks the channel up.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WKRv7ht6XA9Sm8brKctEva1 parent 623287b commit a7db3cf
2 files changed
Lines changed: 42 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 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 | + | |
28 | 53 | | |
29 | 54 | | |
30 | 55 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
34 | 38 | | |
35 | 39 | | |
36 | 40 | | |
37 | 41 | | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
38 | 46 | | |
39 | | - | |
40 | | - | |
41 | 47 | | |
42 | | - | |
43 | | - | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
44 | 53 | | |
45 | 54 | | |
46 | | - | |
47 | | - | |
48 | | - | |
49 | | - | |
50 | | - | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
0 commit comments