-
Notifications
You must be signed in to change notification settings - Fork 2
39 lines (37 loc) · 919 Bytes
/
publish.yaml
File metadata and controls
39 lines (37 loc) · 919 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
38
39
name: Build & Publish to PyPi
on:
push:
tags: [ v* ]
jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: "3.10"
- name: Fetch pip cache
uses: actions/cache@v3
with:
path: ~/.cache/pip
key: pip
- name: Install Poetry
uses: abatilo/actions-poetry@v2.4.0
with:
poetry-version: "1.5.1"
- name: Install publishing tools
run: |
pip install poetry-dynamic-versioning[plugin]
- name: Build and publish package
env:
POETRY_PYPI_TOKEN_PYPI: ${{ secrets.PYPI_TOKEN }}
run: |
poetry publish -n --build
- name: Create GitHub release
uses: ncipollo/release-action@v1
with:
allowUpdates: true
generateReleaseNotes: true