Skip to content

Commit

Permalink
update to pypi trusted publisher
Browse files Browse the repository at this point in the history
  • Loading branch information
gilesknap committed Dec 13, 2023
1 parent 0a3822f commit 038bf37
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/code.yml
Original file line number Diff line number Diff line change
Expand Up @@ -112,8 +112,11 @@ jobs:
needs: [lint, dist, test]
if: ${{ github.event_name == 'push' && startsWith(github.ref, 'refs/tags') }}
runs-on: ubuntu-latest
env:
HAS_PYPI_TOKEN: ${{ secrets.PYPI_TOKEN != '' }}
permissions:
# this permission is mandatory for trusted publishing To PyPI
id-token: write
# Specify the GitHub Environment to publish to
environment: release

steps:
- uses: actions/download-artifact@v3
Expand All @@ -136,7 +139,4 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Publish to PyPI
if: ${{ env.HAS_PYPI_TOKEN }}
uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.PYPI_TOKEN }}

0 comments on commit 038bf37

Please sign in to comment.