Skip to content

Commit f38030b

Browse files
authored
trusted publisher management
1 parent 1f57860 commit f38030b

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

.github/workflows/release.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,8 @@ jobs:
4646
path: dist/*
4747
test:
4848
name: Upload to Test PyPI
49+
permissions:
50+
id-token: write
4951
needs: [build]
5052
runs-on: ubuntu-latest
5153
if: github.event_name == 'release' && github.event.action == 'published'
@@ -57,8 +59,6 @@ jobs:
5759
- uses: pypa/gh-action-pypi-publish@release/v1
5860
with:
5961
skip_existing: true
60-
user: __token__
61-
password: ${{ secrets.TEST_PYPI_API_TOKEN }}
6262
repository_url: https://test.pypi.org/legacy/
6363
- uses: actions/setup-python@v5
6464
with:
@@ -74,6 +74,9 @@ jobs:
7474
venv-test-pypi/bin/python -c "import causalpy; assert causalpy.__version__ == '${{ github.ref_name }}'"
7575
7676
publish:
77+
environment: release
78+
permissions:
79+
id-token: write
7780
name: Upload release to PyPI
7881
needs: [build, test]
7982
runs-on: ubuntu-latest
@@ -84,6 +87,3 @@ jobs:
8487
name: artifact
8588
path: dist
8689
- uses: pypa/gh-action-pypi-publish@release/v1
87-
with:
88-
user: __token__
89-
password: ${{ secrets.PYPI_API_TOKEN }}

0 commit comments

Comments
 (0)