1.3.0 #12
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: Deploy | |
on: | |
release: | |
types: | |
- published | |
jobs: | |
deploy: | |
name: Publish package to PyPI | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Python | |
id: setup-python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: ${{ matrix.python_version }} | |
- name: Pip, Pre-commit & Poetry caches | |
uses: actions/cache@v2 | |
with: | |
path: | | |
~/.cache/ | |
key: ${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('poetry.lock') }}-${{ hashFiles('.pre-commit-config.yaml') }} | |
- name: Install Poetry | |
run: pip install poetry | |
- name: Install Dev dependencies | |
run: poetry install | |
- name: Wait for tests to succeed | |
uses: fountainhead/action-wait-for-check@v1.0.0 | |
id: wait-for-ci | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
checkName: success | |
- name: Exit if CI did not succeed | |
if: steps.wait-for-ci.outputs.conclusion != 'success' | |
run: exit 1 | |
- name: Publish on PyPI | |
run: scripts/publish | |
env: | |
PYPI_TOKEN: "${{ secrets.PYPI_TOKEN }}" |