-
Notifications
You must be signed in to change notification settings - Fork 1
37 lines (33 loc) · 1000 Bytes
/
Copy pathpublish.yml
File metadata and controls
37 lines (33 loc) · 1000 Bytes
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
# job to run on every release to publish to PyPI via poetry:
name: Publish to PyPI
on:
release:
types: [ published ]
permissions:
contents: read
jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: 3.9
- uses: actions/cache@v2
with:
path: ~/.cache/pypoetry
key: ${{ runner.os }}-poetry-${{ hashFiles('**/poetry.lock') }}
restore-keys: |
${{ runner.os }}-poetry-
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install poetry
poetry config virtualenvs.create false
poetry install --no-dev --no-interaction --no-ansi
- name: Publish to PyPI
run: |
poetry config pypi-token.pypi ${{ secrets.PYPI_TOKEN }}
poetry publish --build
env:
POETRY_PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }}