From 087057321395a5d1e2fe21b0f58c58504f9c5af9 Mon Sep 17 00:00:00 2001 From: Brendan <2bndy5@gmail.com> Date: Sat, 5 Oct 2024 02:13:07 -0700 Subject: [PATCH] prepare for trusted publisher releases to pypi --- .github/workflows/release.yml | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index b7c8ff0..d7d2942 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -65,6 +65,8 @@ jobs: upload-pypi: runs-on: ubuntu-latest + permissions: + id-token: write steps: - uses: actions/checkout@v4 with: @@ -87,14 +89,10 @@ jobs: - name: Publish package (to TestPyPI) if: github.event_name == 'workflow_dispatch' && github.repository == 'nRF24/CircuitPython_nRF24L01' - env: - TWINE_USERNAME: __token__ - TWINE_PASSWORD: ${{ secrets.TEST_PYPI_TOKEN }} - run: twine upload --repository testpypi dist/* + uses: pypa/gh-action-pypi-publish@v1.10.3 + with: + repository-url: https://test.pypi.org/legacy/ - name: Publish package (to PyPI) if: github.event_name != 'workflow_dispatch' && github.repository == 'nRF24/CircuitPython_nRF24L01' - env: - TWINE_USERNAME: __token__ - TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }} - run: twine upload dist/* + uses: pypa/gh-action-pypi-publish@v1.10.3