You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The 'Publish on TestPyPI' step of the release job in .github/workflows/release.yml currently runs for any push to master or stable branches, and tag creation events.
This is fine if tags are added after (or just pushed after) a commit has been pushed, as the version number on TestPyPI resulting from the push event will be, e.g. 0.1.2.dev2, prior to the tag 0.1.2 being set.
If however the commit is tagged and push --tags is used, the same version 0.1.2 (or a release candidate) is used for the build and upload to TestPyPI. The second one fails, of course, as said version already exists on TestPyPI.
One solution to this would be to not run the TestPyPI step when pushing commits unless its an untagged, i.e. development version. This can be determined at build time by checking for dev in the setuptools_scm generated version string.
Another would be to not push tags until after the tagged commit has been pushed, but this is more error-prone and inefficient.
The text was updated successfully, but these errors were encountered:
The 'Publish on TestPyPI' step of the
release
job in.github/workflows/release.yml
currently runs for any push tomaster
orstable
branches, and tag creation events.This is fine if tags are added after (or just pushed after) a commit has been pushed, as the version number on TestPyPI resulting from the
push
event will be, e.g.0.1.2.dev2
, prior to the tag0.1.2
being set.If however the commit is tagged and
push --tags
is used, the same version0.1.2
(or a release candidate) is used for the build and upload to TestPyPI. The second one fails, of course, as said version already exists on TestPyPI.One solution to this would be to not run the TestPyPI step when pushing commits unless its an untagged, i.e. development version. This can be determined at build time by checking for
dev
in thesetuptools_scm
generated version string.Another would be to not push tags until after the tagged commit has been pushed, but this is more error-prone and inefficient.
The text was updated successfully, but these errors were encountered: