Skip to content

Commit 0870573

Browse files
committed
prepare for trusted publisher releases to pypi
1 parent fc69216 commit 0870573

File tree

1 file changed

+6
-8
lines changed

1 file changed

+6
-8
lines changed

.github/workflows/release.yml

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,8 @@ jobs:
6565

6666
upload-pypi:
6767
runs-on: ubuntu-latest
68+
permissions:
69+
id-token: write
6870
steps:
6971
- uses: actions/checkout@v4
7072
with:
@@ -87,14 +89,10 @@ jobs:
8789

8890
- name: Publish package (to TestPyPI)
8991
if: github.event_name == 'workflow_dispatch' && github.repository == 'nRF24/CircuitPython_nRF24L01'
90-
env:
91-
TWINE_USERNAME: __token__
92-
TWINE_PASSWORD: ${{ secrets.TEST_PYPI_TOKEN }}
93-
run: twine upload --repository testpypi dist/*
92+
uses: pypa/[email protected]
93+
with:
94+
repository-url: https://test.pypi.org/legacy/
9495

9596
- name: Publish package (to PyPI)
9697
if: github.event_name != 'workflow_dispatch' && github.repository == 'nRF24/CircuitPython_nRF24L01'
97-
env:
98-
TWINE_USERNAME: __token__
99-
TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }}
100-
run: twine upload dist/*
98+
uses: pypa/[email protected]

0 commit comments

Comments
 (0)