Skip to content

Commit cc89b95

Browse files
authored
Update pypi.yml (#975)
1 parent 0c90ba8 commit cc89b95

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

.github/workflows/pypi.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,8 @@ jobs:
4545
name: artifact
4646
path: dist/*
4747
test:
48+
permissions:
49+
id-token: write
4850
name: upload to test PyPI
4951
needs: [build]
5052
runs-on: ubuntu-latest
@@ -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@v4
6464
with:
@@ -71,6 +71,9 @@ jobs:
7171
venv-test-pypi/bin/python -c "import pymc_marketing; assert pymc_marketing.__version__ == '${{ github.ref_name }}'"
7272
7373
publish:
74+
environment: release
75+
permissions:
76+
id-token: write
7477
name: upload release to PyPI
7578
needs: [build, test]
7679
runs-on: ubuntu-latest
@@ -81,6 +84,3 @@ jobs:
8184
name: artifact
8285
path: dist
8386
- uses: pypa/gh-action-pypi-publish@release/v1
84-
with:
85-
user: __token__
86-
password: ${{ secrets.PYPI_API_TOKEN }}

0 commit comments

Comments
 (0)