Skip to content

Commit

Permalink
Add auto publish to pypi when pushing a new tag.
Browse files Browse the repository at this point in the history
  • Loading branch information
JonathanHuot committed Jan 21, 2022
1 parent 05a25a9 commit 2c7650e
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions .github/workflows/publish-release.yml
@@ -0,0 +1,26 @@
name: Publish Tags on PyPi when GitHub creates a release
on:
push:
tags:
- 'v**'
jobs:
publish:
runs-on: ubuntu-latest
fail-fast: false
python-version: 3.9
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install upload dependencies
run: |
python -m pip install --upgrade pip setuptools wheel twine
- name: Build and publish
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.pypi_password }}
run: |
python setup.py sdist bdist_wheel
twine upload dist/*

0 comments on commit 2c7650e

Please sign in to comment.