Skip to content

Commit

Permalink
updates for "trusted publisher"
Browse files Browse the repository at this point in the history
  • Loading branch information
mvberg committed Nov 12, 2024
1 parent b43c2b2 commit ecc0237
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions .github/workflows/publish-to-pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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

0 comments on commit ecc0237

Please sign in to comment.