Skip to content

Commit

Permalink
Auto-build packages and publish to PyPI
Browse files Browse the repository at this point in the history
  • Loading branch information
colinodell committed Aug 13, 2021
1 parent 5ea6625 commit fa30435
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 0 deletions.
37 changes: 37 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Build and publish distributions to PyPI

on:
release:
types: [published]

jobs:
build-and-publish:
name: Build and publish distributions to PyPI
runs-on: ubuntu-18.04
steps:
- uses: actions/checkout@master

- name: Set up Python 3.7
uses: actions/setup-python@v1
with:
python-version: 3.7

- 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 distribution to PyPI
uses: pypa/gh-action-pypi-publish@master
with:
password: ${{ secrets.PYPI_API_TOKEN }}
6 changes: 6 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[build-system]
requires = [
"setuptools>=42",
"wheel"
]
build-backend = "setuptools.build_meta"

0 comments on commit fa30435

Please sign in to comment.