Repository navigation
Commit f7de697
committed
fix(ci): make a failed publish retryable, and unpin the stale twine
v0.11.0 was tagged and its GitHub Release created, but the PyPI upload failed:
Checking dist/hotdata_framework-0.11.0-py3-none-any.whl:
ERROR InvalidDistribution: Invalid distribution metadata:
'2.5' is not a valid metadata version
Nothing to do with the code. gh-action-pypi-publish was pinned at v1.13.0
(Sept 2025), whose bundled twine predates `Metadata-Version: 2.5`, which current
hatchling emits. Bumped to v1.14.2.
Note the build job's own `twine check --strict` PASSED, because it
pip-installs a current twine. So the incompatibility was invisible until upload,
by which point the tag was already public -- the check that exists to catch bad
metadata cannot catch this class at all.
RETRYABILITY IS THE REAL FIX. Both workflows triggered only on tag push, so a
publish that failed for reasons unrelated to the code left two bad options:
delete and re-push the tag, or burn a version number on a CI fix. Neither is a
reasonable answer to "the upload failed, run it again". Both now accept a
workflow_dispatch with a tag input, checkout that ref, and derive the version
from it.
release.yml gets the same treatment for a second reason: RELEASING.md already
documents the recovery command
gh workflow run "GitHub Release" --ref main -f tag=vX.Y.Z
and the trigger it needs was never there, so that documented path has always
failed. This makes the doc true.
Verified both files parse with triggers ['push', 'workflow_dispatch'] and a
`tag` input, and no GITHUB_REF_NAME references remain in either.1 parent 54b33f0 commit f7de697
2 files changed
Lines changed: 44 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
7 | 18 | | |
8 | 19 | | |
9 | | - | |
| 20 | + | |
10 | 21 | | |
11 | 22 | | |
12 | 23 | | |
| |||
16 | 27 | | |
17 | 28 | | |
18 | 29 | | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
19 | 33 | | |
20 | 34 | | |
| 35 | + | |
| 36 | + | |
21 | 37 | | |
22 | 38 | | |
23 | 39 | | |
| |||
28 | 44 | | |
29 | 45 | | |
30 | 46 | | |
31 | | - | |
32 | | - | |
| 47 | + | |
| 48 | + | |
33 | 49 | | |
34 | 50 | | |
35 | | - | |
| 51 | + | |
36 | 52 | | |
37 | 53 | | |
38 | 54 | | |
| |||
65 | 81 | | |
66 | 82 | | |
67 | 83 | | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
68 | 89 | | |
69 | | - | |
| 90 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
7 | 17 | | |
8 | 18 | | |
9 | 19 | | |
| |||
12 | 22 | | |
13 | 23 | | |
14 | 24 | | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
15 | 28 | | |
16 | 29 | | |
| 30 | + | |
| 31 | + | |
17 | 32 | | |
18 | 33 | | |
19 | 34 | | |
| |||
23 | 38 | | |
24 | 39 | | |
25 | 40 | | |
26 | | - | |
| 41 | + | |
27 | 42 | | |
28 | 43 | | |
29 | 44 | | |
30 | 45 | | |
31 | 46 | | |
32 | 47 | | |
33 | 48 | | |
34 | | - | |
| 49 | + | |
35 | 50 | | |
36 | 51 | | |
37 | 52 | | |
| |||
47 | 62 | | |
48 | 63 | | |
49 | 64 | | |
50 | | - | |
| 65 | + | |
51 | 66 | | |
52 | 67 | | |
53 | 68 | | |
| |||
0 commit comments