Skip to content

Commit

Permalink
Add a GH workflow to publish to PyPI upon tag
Browse files Browse the repository at this point in the history
  • Loading branch information
dlax committed Jun 18, 2021
1 parent 7a4adf9 commit 249034a
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Publish

on:
push:
tags:
- '*'

jobs:
publish:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: 3.9
- name: Install
run: python -m pip install setuptools wheel twine
- name: Build
run: |
python setup.py check
python setup.py sdist bdist_wheel
python -m twine check dist/*
- name: Publish
run: python -m twine upload dist/*
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }}

0 comments on commit 249034a

Please sign in to comment.