Skip to content

Commit

Permalink
Added Github workflow to publish to PyPI
Browse files Browse the repository at this point in the history
  • Loading branch information
byrdie committed Aug 1, 2023
1 parent 5673c12 commit a9d87f7
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Publish to PyPI and TestPyPI

on:
release:
types: [published]

jobs:
publish:
name: Build and publish to PyPI and TestPyPI
if: startsWith(github.ref, 'refs/tags')
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: Set up Python
uses: actions/setup-python@v3
- name: Install pypa/build
run: >-
python -m
pip install
build
--user
- name: Build a binary wheel and a source tarball
run: >-
python -m
build
--sdist
--wheel
--outdir dist/
- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.PYPI_API_TOKEN }}

0 comments on commit a9d87f7

Please sign in to comment.