Add PyPI publish action (#91)

* Add PyPI publish action

* Use poetry

* Bump version to 0.7.0
This commit is contained in:
Dave Gallant
2021-05-02 10:16:34 -04:00
committed by GitHub
parent 737ed13220
commit 740312ee42
8 changed files with 757 additions and 17 deletions

2
.github/CODEOWNERS vendored
View File

@@ -3,4 +3,4 @@
# @davegallant will be requested for
# review when someone opens a pull request.
* @davegallant
* @davegallant

33
.github/workflows/pypi.yml vendored Normal file
View File

@@ -0,0 +1,33 @@
name: PyPI Publish
on: [push]
jobs:
build:
name: Build and publish Python 🐍 distributions 📦 to PyPI
if: startsWith(github.ref, 'refs/tags')
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: Set up Python
uses: actions/setup-python@v1
with:
python-version: 3.9
- 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 package
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}

View File

@@ -1,5 +1,5 @@
name: Tests
on: [push]
on: [pull_request]
jobs:
build:
@@ -16,10 +16,10 @@ jobs:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
pip install .
pip install -r requirements_dev.txt
pip install poetry==1.1.6
poetry install
- name: Run pre-commit
run: |
git diff --name-only $TRAVIS_COMMIT_RANGE | xargs pre-commit run --files
git diff --name-only $TRAVIS_COMMIT_RANGE | xargs poetry run pre-commit run --files
- name: Test
run: make ci
run: poetry run make ci