-
Notifications
You must be signed in to change notification settings - Fork 1
52 lines (52 loc) · 1.67 KB
/
release.yml
File metadata and controls
52 lines (52 loc) · 1.67 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
---
name: Release
on: # yamllint disable-line rule:truthy
push:
tags: [v*]
permissions:
contents: write
id-token: write
pull-requests: read
jobs:
release:
runs-on: ubuntu-latest
environment: pypi
steps:
- name: Checkout code
# yamllint disable-line rule:line-length
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
fetch-depth: 0
- name: Set up uv
# yamllint disable-line rule:line-length
uses: astral-sh/setup-uv@37802adc94f370d6bfd71619e3f0bf239e1f3b78 # v7.6.0
with:
enable-cache: false
- name: Build package
run: uv build
- name: Publish to PyPI
# yamllint disable-line rule:line-length
uses: pypa/gh-action-pypi-publish@cef221092ed1bacb1cc03d23a2d87d1d172e277b # v1.14.0
- name: Generate release notes
id: git-cliff
# yamllint disable-line rule:line-length
uses: orhun/git-cliff-action@f50e11560dce63f7c33227798f90b924471a88b5 # ratchet:orhun/git-cliff-action@v4.8.0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
args: --current
- name: Create GitHub Release
env:
GH_TOKEN: ${{ github.token }}
TAG: ${{ github.ref_name }}
NOTES_FILE: ${{ steps.git-cliff.outputs.changelog }}
run: |-
gh release create "$TAG" \
--title "$TAG" \
--notes-file "$NOTES_FILE"
- name: Upload dist to GitHub Release
env:
GH_TOKEN: ${{ github.token }}
TAG: ${{ github.ref_name }}
run: gh release upload "$TAG" dist/*