diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index f1261c0..09a707b 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -132,6 +132,11 @@ jobs: name: Publish wheels to PyPI needs: build runs-on: ubuntu-latest + environment: + name: pypi + url: https://pypi.org/p/pyceres + permissions: + id-token: write # We publish the wheel to pypi when a new tag is pushed, # either by creating a new GitHub release or explictly with `git tag` if: ${{ github.event_name == 'release' || startsWith(github.ref, 'refs/tags') }} @@ -143,9 +148,7 @@ jobs: - name: Move wheels run: mkdir ./wheelhouse && mv ./artifacts/**/*.whl ./wheelhouse/ - name: Publish package - uses: pypa/gh-action-pypi-publish@release/v1 + uses: pypa/gh-action-pypi-publish@v1.13.0 with: skip_existing: true - user: __token__ - password: ${{ secrets.PYPI_API_TOKEN }} packages_dir: ./wheelhouse/