Skip to content

Commit

Permalink
Merge pull request #1424 from danforthcenter/fix-pypi-deploy
Browse files Browse the repository at this point in the history
Update PyPi deploy workflow to use OIDC authentication
  • Loading branch information
nfahlgren committed Jan 16, 2024
2 parents 5bd2e14 + dd1b73d commit 72d85da
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions .github/workflows/publish-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,11 @@ jobs:
deploy:
needs: build
runs-on: ubuntu-latest

environment:
name: pypi
url: https://pypi.org/p/plantcv
permissions:
id-token: write
steps:
- uses: actions/checkout@main
with:
Expand All @@ -46,10 +50,8 @@ jobs:
run: |
python -m pip install --upgrade pip
pip install setuptools wheel twine
- name: Build and publish
env:
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
- name: Build
run: |
python setup.py sdist bdist_wheel
twine upload dist/*
- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@release/v1

0 comments on commit 72d85da

Please sign in to comment.