Skip to content

Commit

Permalink
Merge pull request #226 from olcf/pypi_upload
Browse files Browse the repository at this point in the history
Pypi workflow
  • Loading branch information
carljbai authored Oct 11, 2024
2 parents 00c1a18 + c2c4cda commit 2d98dd7
Showing 1 changed file with 17 additions and 7 deletions.
24 changes: 17 additions & 7 deletions .github/workflows/pythonpublish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,14 @@ on:
jobs:
deploy:
runs-on: ubuntu-latest
permissions:
# https://docs.pypi.org/trusted-publishers/using-a-publisher/
# https://github.com/marketplace/actions/pypi-publish
# IMPORTANT: this permission is mandatory for trusted publishing
id-token: write
environment:
name: pypi
url: https://pypi.org/p/pkpass-olcf
steps:
- uses: actions/checkout@v1
- name: Set up Python
Expand All @@ -17,10 +25,12 @@ 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 }}
run: |
python setup.py sdist bdist_wheel
twine upload dist/*
- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
#- name: Build and publish
#env:
# TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
# TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
# run: |
# python setup.py sdist bdist_wheel
# twine upload dist/* --verbose

0 comments on commit 2d98dd7

Please sign in to comment.