-
Notifications
You must be signed in to change notification settings - Fork 2
52 lines (47 loc) · 1.23 KB
/
deploy_pypi.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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
name: Deploy to pypi
on:
push:
tags:
- "v*"
jobs:
publish_pypi:
name: Publish to pypi
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.13"
- name: Install Poetry
uses: snok/install-poetry@v1
with:
version: 1.8.4
virtualenvs-create: true
virtualenvs-in-project: true
- name: Publish
env:
PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }}
run: |
poetry publish --username=__token__ --password="$PYPI_TOKEN" --build
publish_release_note:
name: Publish release note
runs-on: ubuntu-latest
needs: publish_pypi
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Generate a changelog
uses: orhun/git-cliff-action@v3
id: git-cliff
with:
config: cliff.toml
args: -vv --current --strip header
env:
OUTPUT: CHANGELOG.md
- name: Create GitHub release
uses: softprops/action-gh-release@v2
with:
body_path: ${{ steps.git-cliff.outputs.changelog }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}