Skip to content

v0.4.1

v0.4.1 #12

Workflow file for this run

name: Build and deploy
on:
workflow_dispatch:
# push:
# # Sequence of patterns matched against refs/tags
# tags:
# - '[0-9]+.[0-9]+.[0-9]+' # Push events to any matching semantic tag. For example, 1.10.1 or 2.0.0.
release:
types:
- published
jobs:
dist:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Build wheel and SDist
run: pipx run build
- uses: actions/upload-artifact@v2
with:
path: dist/*
- name: Check metadata
run: pipx run twine check dist/*
publish:
needs: [dist]
runs-on: ubuntu-latest
# upload to PyPI on every tag starting with 'v'
# if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags/v')
# alternatively, to publish when a GitHub Release is created, use the following rule:
if: (github.event_name == 'release' && github.event.action == 'published') || github.event_name == 'workflow_dispatch'
steps:
- uses: actions/download-artifact@v2
with:
name: artifact
path: dist
- name: Publish distribution 📦 to PyPI
uses: pypa/[email protected]
with:
password: ${{ secrets.PYPI_API_TOKEN_PYCBA }}
# remove following once testing complete
# user: __token__
# password: ${{ secrets.TEST_PYPI_API_TOKEN_PYCBA }}
# repository_url: https://test.pypi.org/legacy/