Skip to content

Commit

Permalink
Deploy to PyPI with trusted publishing
Browse files Browse the repository at this point in the history
  • Loading branch information
arkq committed Feb 6, 2024
1 parent ab13226 commit 0061d9a
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@ jobs:
deploy:
if: github.repository_owner == 'arkq'
runs-on: ubuntu-latest
environment:
name: pypi
url: https://pypi.org/p/flake8-requirements
permissions:
id-token: write
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
Expand All @@ -16,10 +21,7 @@ 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 bdist_wheel
twine upload dist/*
- name: Build
run: python setup.py bdist_wheel
- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@release/v1

0 comments on commit 0061d9a

Please sign in to comment.