Skip to content

Commit

Permalink
trusted publisher management
Browse files Browse the repository at this point in the history
  • Loading branch information
drbenvincent authored Aug 23, 2024
1 parent 1f57860 commit f38030b
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@ jobs:
path: dist/*
test:
name: Upload to Test PyPI
permissions:
id-token: write
needs: [build]
runs-on: ubuntu-latest
if: github.event_name == 'release' && github.event.action == 'published'
Expand All @@ -57,8 +59,6 @@ jobs:
- uses: pypa/gh-action-pypi-publish@release/v1
with:
skip_existing: true
user: __token__
password: ${{ secrets.TEST_PYPI_API_TOKEN }}
repository_url: https://test.pypi.org/legacy/
- uses: actions/setup-python@v5
with:
Expand All @@ -74,6 +74,9 @@ jobs:
venv-test-pypi/bin/python -c "import causalpy; assert causalpy.__version__ == '${{ github.ref_name }}'"
publish:
environment: release
permissions:
id-token: write
name: Upload release to PyPI
needs: [build, test]
runs-on: ubuntu-latest
Expand All @@ -84,6 +87,3 @@ jobs:
name: artifact
path: dist
- uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}

0 comments on commit f38030b

Please sign in to comment.