Skip to content

Commit

Permalink
CI move to pypi's trusted publisher workflow (#399)
Browse files Browse the repository at this point in the history
  • Loading branch information
adrinjalali authored Oct 23, 2023
1 parent 60d7063 commit 20a72bc
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/publish-pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,11 @@ jobs:
publish:

runs-on: ubuntu-latest
# Specifying a GitHub environment is optional, but strongly encouraged
environment: publish-pypi
permissions:
# IMPORTANT: this permission is mandatory for trusted publishing
id-token: write

steps:
- uses: actions/checkout@v4
Expand All @@ -36,14 +41,9 @@ jobs:
- name: Publish package to TestPyPI
uses: pypa/gh-action-pypi-publish@v1.8.10
with:
user: __token__
password: ${{ secrets.TEST_PYPI_TOKEN }}
repository-url: https://test.pypi.org/legacy/
if: ${{ github.event.inputs.pypi_repo == 'testpypi' }}

- name: Publish package to PyPI
uses: pypa/gh-action-pypi-publish@v1.8.10
with:
user: __token__
password: ${{ secrets.PYPI_TOKEN }}
if: ${{ github.event.inputs.pypi_repo == 'pypi' }}

0 comments on commit 20a72bc

Please sign in to comment.