v0.5.2 #18
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: 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/gh-action-pypi-publish@v1.8.14 | |
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/ | |