-
Notifications
You must be signed in to change notification settings - Fork 11
36 lines (32 loc) · 884 Bytes
/
python-publish.yml
File metadata and controls
36 lines (32 loc) · 884 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
# https://testdriven.io/tips/810f9bb5-c9df-479d-baa4-290c7e0779f1/
# https://github.com/abatilo/actions-poetry
name: Release Python Package
on:
release:
types: [published]
permissions:
contents: read
jobs:
publish:
strategy:
fail-fast: false
matrix:
python-version: [3.9]
poetry-version: [1.7.1]
os: [ubuntu-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install poetry
uses: abatilo/actions-poetry@v3
with:
poetry-version: ${{ matrix.poetry-version }}
- name: Publish
env:
PYPI_API_TOKEN: ${{ secrets.PYPI_API_TOKEN }}
run: |
poetry config pypi-token.pypi $PYPI_API_TOKEN
poetry publish --build