diff --git a/.github/workflows/publish-to-pypi.yml b/.github/workflows/publish-to-pypi.yml index 6b47f42..c3926b7 100644 --- a/.github/workflows/publish-to-pypi.yml +++ b/.github/workflows/publish-to-pypi.yml @@ -6,6 +6,9 @@ jobs: build-n-publish: name: Build and publish package to PyPI and TestPyPI runs-on: ubuntu-22.04 + permissions: + # IMPORTANT: this permission is mandatory for trusted publishing + id-token: write steps: - uses: actions/checkout@master - name: Set up Python 3.7 @@ -29,13 +32,13 @@ jobs: - name: Publish package to Test PyPI uses: pypa/gh-action-pypi-publish@release/v1 with: - password: ${{ secrets.test_pypi_token }} + #password: ${{ secrets.test_pypi_token }} repository_url: https://test.pypi.org/legacy/ skip_existing: true - name: Publish package to PyPI if: startsWith(github.ref, 'refs/tags') uses: pypa/gh-action-pypi-publish@release/v1 with: - password: ${{ secrets.pypi_token }} + #password: ${{ secrets.pypi_token }} skip_existing: true \ No newline at end of file