Commit 7d52df7
committed
CI: Ignore version duplicates when publishing to TestPyPI
This commit prevents the failure of the GitHub Actions job "Publish
distribution package to TestPyPI" on most pushes (see discussion at
#721 (comment)),
since recent commit a3e1325 "CI: Publish PyPI releases using GitHub
Actions workflows".
Indeed, TestPyPI doesn't allow repushing the same version. Use
`skip-existing` to prevent to such failures on the CI.
An alternative would be to use the `setuptools-scm` plugin to define a
unique version for each commit (e.g. `1.36.2.dev2+gd4f1c14`), but it
requires more changes (define the version in `pyproject.toml`, fetch
tags from GitHub in `publish.yaml`, exclude `.*` + `.github/**` files in
`MANIFEST.in`). Moreover it doesn't work as is: to prevent errors like
`HTTP 400 The use of local versions in '1.36.2.dev2+gd4f1c14' is not
allowed` we would need `local_scheme = "no-local-version"`, which would
push duplicated versions on TestPyPI anyway.1 parent 16727ac commit 7d52df7
1 file changed
+1
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
46 | 46 | | |
47 | 47 | | |
48 | 48 | | |
| 49 | + | |
49 | 50 | | |
50 | 51 | | |
51 | 52 | | |
| |||
0 commit comments