Version 12.0.0 #20
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: Publish | |
on: | |
release: | |
types: | |
- created | |
jobs: | |
publish: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/setup-python@v2 | |
with: | |
python-version: 3.10.x | |
- name: Upgrade pip | |
run: pip install --upgrade --user pip | |
- name: Install Poetry | |
run: pip install poetry | |
- name: Cache virtual environment | |
uses: actions/cache@v2 | |
with: | |
path: .venv | |
key: ${{ runner.os }}-python-${{ matrix.python-version }}-venv-${{ hashFiles('**/poetry.lock') }} | |
- name: Install dependencies | |
run: poetry install --no-interaction | |
- name: Build and validate | |
run: | | |
poetry run task minify | |
poetry build | |
poetry run pip install --quiet --disable-pip-version-check "twine>=1.12" | |
poetry run twine check --strict dist/* | |
- name: Publish | |
env: | |
# https://python-poetry.org/docs/repositories/#configuring-credentials | |
POETRY_PYPI_TOKEN_PYPI: ${{ secrets.POETRY_PYPI_TOKEN_PYPI }} | |
run: | | |
poetry publish |