v0.6.0 #23
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: PyPi Release | |
# https://help.github.com/en/actions/reference/events-that-trigger-workflows | |
on: | |
# Only trigger on release creation | |
release: | |
types: | |
- created | |
workflow_dispatch: | |
# based on https://github.com/pypa/gh-action-pypi-publish | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Get history and tags for SCM versioning to work | |
run: | | |
git fetch --prune --unshallow | |
git fetch --depth=1 origin +refs/tags/*:refs/tags/* | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: "3.10" | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
python -m pip install tox wheel build | |
- name: Build | |
run: | | |
python -m build | |
# We do this, since failures on test.pypi aren't that bad | |
- name: Publish to Test PyPI | |
if: startsWith(github.event.ref, 'refs/tags') || github.event_name == 'release' | |
uses: pypa/gh-action-pypi-publish@release/v1 | |
with: | |
user: __token__ | |
password: ${{ secrets.TEST_PYPI_API_TOKEN }} | |
repository_url: https://test.pypi.org/legacy/ | |
- name: Publish to PyPI | |
if: startsWith(github.event.ref, 'refs/tags') || github.event_name == 'release' | |
uses: pypa/gh-action-pypi-publish@release/v1 | |
with: | |
user: __token__ | |
password: ${{ secrets.PYPI_API_TOKEN }} |