Skip to content

Commit cf93107

Browse files
committed
feat: replace manual pypi upload through nox session with github action so that oidc publishing can be used
1 parent a98f2e3 commit cf93107

File tree

1 file changed

+6
-8
lines changed

1 file changed

+6
-8
lines changed

{{cookiecutter.project_name}}/.github/workflows/release-python.yml

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -68,10 +68,10 @@ jobs:
6868
name: distribution-packages-{{ "${{ needs.get_tag.outputs.tag }}" }}
6969
path: dist/
7070

71-
- name: Publish to TestPyPI
72-
env:
73-
UV_PUBLISH_TOKEN: {{"${{ secrets.TESTPYPI_API_TOKEN }}"}}
74-
run: uvx nox -s publish-python -- --index testpypi
71+
- name: Publish package distributions to TestPyPI
72+
uses: pypa/gh-action-pypi-publish@release/v1
73+
with:
74+
repository-url: https://test.pypi.org/legacy/
7575

7676
publish_pypi_and_github:
7777
name: Publish to Production PyPI and GitHub
@@ -101,10 +101,8 @@ jobs:
101101
git tag {{ "${{ needs.build_and_testpypi.outputs.tag }}" }}
102102
git push origin {{ "${{ needs.build_and_testpypi.outputs.tag }}" }}
103103
104-
- name: Publish to PyPI
105-
env:
106-
UV_PUBLISH_TOKEN: {{ "${{ secrets.PYPI_API_TOKEN }}" }}
107-
run: uvx nox -s publish-python
104+
- name: Publish package distributions to TestPyPI
105+
uses: pypa/gh-action-pypi-publish@release/v1
108106

109107
- name: Publish to GitHub
110108
env:

0 commit comments

Comments
 (0)