Skip to content

Release version 3.1.0 #43

Release version 3.1.0

Release version 3.1.0 #43

Workflow file for this run

# Based on https://packaging.python.org/guides/publishing-package-distribution-releases-using-github-actions-ci-cd-workflows/
name: Publish to PyPI
permissions: read-all
on:
push:
tags:
- '**'
jobs:
build-n-publish:
name: Build and publish
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
with:
persist-credentials: false
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@v1
with:
python-version: 3.8
- 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: Verify tag is annotated
if: startsWith(github.ref, 'refs/tags')
run: >-
test $(git for-each-ref --format='%(objecttype)' ${GITHUB_REF}) == tag
- name: Publish distribution to PyPI
if: startsWith(github.ref, 'refs/tags')
uses: pypa/gh-action-pypi-publish@717ba43cfbb0387f6ce311b169a825772f54d295 # v1.5.0
with:
password: ${{ secrets.PYPI_API_TOKEN }}