Commit a407801
authored
fix(publish): unblock 0.21.0 PyPI release; make publishes idempotent (#38)
Two issues kept past releases (and 0.21.0) from auto-publishing PyPI:
1. clients/python/src/tangle_agent_eval/__init__.py carried a hardcoded
`__version__` fallback that drifts every release. The verify step in
publish.yml compares it against package.json and exits with
"Version mismatch: npm=X python_runtime=Y" before either publish runs.
2. publish-pypi declared `needs: [verify, publish-npm]`. After a tag
re-fire (manual publish, workflow re-run, or a fresh tag on the same
commit), publish-npm trips over "version already on registry" and
blocks PyPI. Coupling these stages was the wrong primitive — PyPI is
not downstream of npm; they're parallel artifacts of the same release.
Fix:
- Bump the Python runtime fallback to 0.21.0. Pre-commit, this matched
pyproject.toml; releasing requires bumping it too. (A future cleanup
is to derive __version__ from pyproject.toml at build time so the
drift can't happen — out of scope here.)
- publish-npm now skips with a log message when the version is already on
the registry, instead of failing.
- publish-pypi gates on `verify` only, and pre-checks PyPI for the
version before invoking the trusted-publish action — idempotent on
re-fires.
After this lands, deleting + force-re-pushing v0.21.0 will fire the
workflow and publish the PyPI sdist + wheel that 0.21.0 needs to match
the already-published @tangle-network/agent-eval@0.21.0 on npm.1 parent a74b419 commit a407801
2 files changed
Lines changed: 30 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
100 | 100 | | |
101 | 101 | | |
102 | 102 | | |
103 | | - | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
104 | 116 | | |
105 | 117 | | |
106 | 118 | | |
107 | 119 | | |
108 | | - | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
109 | 124 | | |
110 | 125 | | |
111 | 126 | | |
| |||
125 | 140 | | |
126 | 141 | | |
127 | 142 | | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
128 | 154 | | |
| 155 | + | |
129 | 156 | | |
130 | 157 | | |
131 | 158 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
47 | | - | |
| 47 | + | |
48 | 48 | | |
49 | 49 | | |
50 | 50 | | |
| |||
0 commit comments