fix: disable automatic releases to test.pypi.org

[test.]pypi.org reject uploads of distributions with an already
  existing version number.

Publishing to testpypi on every commit therefore does not work
  in the current versioning setup since it leads to
  duplicate release versions.
Этот коммит содержится в:
Viginum-DataScientist-6 2025-07-29 13:04:13 +00:00
родитель 8979129306
Коммит c7107aae1d

28
.github/workflows/publish-to-pypi.yml поставляемый
Просмотреть файл

@ -1,5 +1,5 @@
# derived from https://packaging.python.org/en/latest/guides/publishing-package-distribution-releases-using-github-actions-ci-cd-workflows/#the-whole-ci-cd-workflow
name: Publish Python 🐍 distribution 📦 to PyPI and TestPyPI
name: Publish Python 🐍 distribution 📦 to PyPI
on: push
@ -115,28 +115,4 @@ jobs:
run: >-
gh release upload
"$GITHUB_REF_NAME" dist/**
--repo "$GITHUB_REPOSITORY"
publish-to-testpypi:
name: Publish Python 🐍 distribution 📦 to TestPyPI
needs:
- build
runs-on: ubuntu-latest
environment:
name: testpypi
url: https://test.pypi.org/p/d3lta # pypi is case insensitive so d3lta == D3lta
permissions:
id-token: write # IMPORTANT: mandatory for trusted publishing
steps:
- name: Download all the dists
uses: actions/download-artifact@v4
with:
name: python-package-distributions
path: dist/
- name: Publish distribution 📦 to TestPyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
repository-url: https://test.pypi.org/legacy/
--repo "$GITHUB_REPOSITORY"