diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index b390915..6836e35 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -8,6 +8,11 @@ jobs: build-n-publish: name: Build and publish Python distributions to PyPI runs-on: ubuntu-latest + environment: + name: pypi + url: https://pypi.org/project/RachioPy + permissions: + id-token: write # IMPORTANT: this permission is mandatory for trusted publishing steps: - uses: actions/checkout@master - name: Set up Python 3.x @@ -25,12 +30,9 @@ jobs: run: python setup.py sdist bdist_wheel - name: Publish distribution to Test PyPI if: startsWith(github.ref, 'refs/tags') - uses: pypa/gh-action-pypi-publish@master + uses: pypa/gh-action-pypi-publish@release/v1 with: - password: ${{ secrets.test_pypi_password }} - repository_url: https://test.pypi.org/legacy/ + repository-url: https://test.pypi.org/legacy/ - name: Publish distribution to PyPI if: startsWith(github.ref, 'refs/tags') - uses: pypa/gh-action-pypi-publish@master - with: - password: ${{ secrets.pypi_password }} + uses: pypa/gh-action-pypi-publish@release/v1