From f7d821738dd9b89345f462875aca1fb3509c5929 Mon Sep 17 00:00:00 2001 From: Brendan <2bndy5@gmail.com> Date: Sat, 5 Oct 2024 02:31:42 -0700 Subject: [PATCH] prepare for trusted publisher releases --- .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 ed276c4..d8083f1 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -57,6 +57,8 @@ jobs: upload-pypi: runs-on: ubuntu-latest + permissions: + id-token: write steps: - uses: actions/checkout@v4 with: @@ -79,14 +81,10 @@ jobs: - name: Publish package (to TestPyPI) if: github.event_name == 'workflow_dispatch' && github.repository == '2bndy5/CircuitPython_Cirque_Pinnacle' - 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 == '2bndy5/CircuitPython_Cirque_Pinnacle' - env: - TWINE_USERNAME: __token__ - TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }} - run: twine upload dist/* + uses: pypa/gh-action-pypi-publish@v1.10.3