Skip to content
Prev Previous commit
Next Next commit
Update release to PyPI workflow
  • Loading branch information
willbarton committed Jan 12, 2023
commit 17e7d9c20e1bb175266a853976e3fd02a03227a0
16 changes: 9 additions & 7 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,26 +1,28 @@
name: Publish to PyPI
on:
on:
release:
types: [published]
workflow_dispatch:


jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v1
uses: actions/setup-python@v4
with:
python-version: 3.7
python-version: 3.11
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install --upgrade pip build
pip install twine wheel
- name: Build the package
run: |
python setup.py sdist bdist_wheel --universal
python -m build
- name: Upload to PyPI
run: twine upload dist/*
env:
env:
TWINE_USERNAME: ${{ secrets.TWINE_USERNAME }}
TWINE_PASSWORD: ${{ secrets.TWINE_PASSWORD }}