Skip to content

Commit 72d85da

Browse files
authored
Merge pull request #1424 from danforthcenter/fix-pypi-deploy
Update PyPi deploy workflow to use OIDC authentication
2 parents 5bd2e14 + dd1b73d commit 72d85da

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

.github/workflows/publish-package.yml

+8-6
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,11 @@ jobs:
3333
deploy:
3434
needs: build
3535
runs-on: ubuntu-latest
36-
36+
environment:
37+
name: pypi
38+
url: https://pypi.org/p/plantcv
39+
permissions:
40+
id-token: write
3741
steps:
3842
- uses: actions/checkout@main
3943
with:
@@ -46,10 +50,8 @@ jobs:
4650
run: |
4751
python -m pip install --upgrade pip
4852
pip install setuptools wheel twine
49-
- name: Build and publish
50-
env:
51-
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
52-
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
53+
- name: Build
5354
run: |
5455
python setup.py sdist bdist_wheel
55-
twine upload dist/*
56+
- name: Publish to PyPI
57+
uses: pypa/gh-action-pypi-publish@release/v1

0 commit comments

Comments
 (0)