-
Notifications
You must be signed in to change notification settings - Fork 335
38 lines (36 loc) · 1.1 KB
/
publish.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
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.8.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