-
Notifications
You must be signed in to change notification settings - Fork 367
58 lines (45 loc) · 1.29 KB
/
release.yml
File metadata and controls
58 lines (45 loc) · 1.29 KB
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
53
54
55
56
57
58
on:
push:
tags:
- '*'
name: Create a Release
jobs:
run:
runs-on: ubuntu-latest
environment:
name: release
permissions:
id-token: write
contents: read
steps:
- uses: actions/checkout@v5
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: '3.14'
- name: Install UV
uses: astral-sh/setup-uv@v7
with:
enable-cache: true
- name: Build Project
run: uv build
- name: Publish to PyPi
run: uv publish
- name: Generate Release Notes
run: |
current_tag=${{ github.ref_name }}
previous_tag=$(git describe --abbrev=0 --match "*" --tags $current_tag^)
echo "current_tag=$current_tag"
echo "previous_tag=$previous_tag"
echo "commit_history"
echo "=============="
while read -r;
do
echo "- $REPLY" | tee -a body.md
done < <(git log --pretty=oneline --abbrev-commit --decorate-refs-exclude=refs/tags $current_tag...$previous_tag)
echo "=============="
- name: Publish GitHub Release
uses: ncipollo/release-action@v1
with:
bodyFile: "body.md"
tag: ${{ github.ref_name }}