v1.0.4 "crimson meerkat" #9
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: Release | |
on: | |
release: | |
types: [published] | |
jobs: | |
release: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Output Python version | |
id: python-version | |
run: | | |
echo "::set-output name=python-version::$(cat .python-version)" | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ steps.python-version.outputs.python-version }} | |
architecture: x64 | |
- name: Install and configure Poetry | |
run: | | |
pip install poetry==1.7.0 | |
poetry config virtualenvs.in-project true | |
- name: Set up cache | |
uses: actions/cache@v3 | |
with: | |
path: .venv | |
key: venv-${{ runner.os }}-poetry-${{ hashFiles('**/poetry.lock') }} | |
- name: Install dependencies | |
run: poetry install | |
- name: Run pytest | |
run: poetry run pytest . | |
- name: Build artifacts | |
run: poetry build | |
- name: Publish to PyPI | |
run: poetry publish --username=__token__ --password=${{ secrets.PYPI_TOKEN }} |