Hey folks! I’m stuck with python-semantic-release on a “test” branch where it keeps trying to upload the same artifacts (version 0.1.0-rc.1), resulting in a 422 (Unprocessable Entity) error on GitHub. Here’s the situation:
- I have a “test” branch for dev/pre-releases.
- I originally ran
python -m buildbefore runningsemantic-release publish, so it always built artifacts labeled0.1.0(or0.1.0-rc.1). - When semantic-release checks for a new version, it never increments beyond
0.1.0-rc.1, reuses the same tag, and tries to re-upload the same.whl/.tar.gzto GitHub → 422 error because those files already exist under that release.
I’ve tried:
- Removing the manual
python -m buildstep (letting semantic-release do the build), - Creating commits with
feat!: ... BREAKING CHANGE:lines to force major bumps, - Even environment overrides like
SEMANTIC_RELEASE_LEVEL=minor.
No matter what, the logs say “found 1 previous tag (0.1.0-rc.1),” reuses that tag, and collides with existing assets. Any idea why it won’t bump to something like 0.1.0-rc.2 or 0.2.0-rc.1? Is it because semantic-release thinks there aren’t actually new recognized commits, or because the prior build is always the same version?
How should I ensure each run actually increments the version and builds unique artifacts so we don’t keep hitting the 422 error? Any tips or config suggestions would be greatly appreciated!