Repository navigation
88 lines (84 loc) · 2.23 KB
/
Copy pathtag.yml
File metadata and controls
88 lines (84 loc) · 2.23 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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
name: tag
on:
push:
tags:
- "*.*.*"
jobs:
build:
runs-on: ubuntu-24.04
steps:
- name: Clone full tree, and checkout tag
uses: actions/checkout@v6
with:
fetch-depth: 0
- name: Setup Python
uses: actions/setup-python@v6
with:
python-version: "3.14"
cache: "pip"
- name: Setup uv
uses: astral-sh/setup-uv@v7
with:
version: "0.9.26"
- name: Build source dist and wheels
run: uv build
- name: Upload source dist and wheels to artifacts
uses: actions/upload-artifact@v6
with:
name: dist
path: dist/
retention-days: 5
if-no-files-found: error
publish-pypi:
needs: build
runs-on: ubuntu-24.04
environment: pypi
permissions:
id-token: write
steps:
- name: Clone full tree, and checkout tag
uses: actions/checkout@v6
with:
fetch-depth: 0
- name: Download source dist and wheels from artifacts
uses: actions/download-artifact@v7
with:
name: dist
path: dist/
- name: Setup Python
uses: actions/setup-python@v6
with:
python-version: "3.14"
cache: "pip"
- name: Setup uv
uses: astral-sh/setup-uv@v7
with:
version: "0.9.26"
- name: Publish source dist and wheels to PyPI
run: uv publish
publish-github-release:
needs: build
runs-on: ubuntu-24.04
permissions:
contents: write
steps:
- name: Clone and checkout tag
uses: actions/checkout@v6
- name: Download source dist and wheels from artifacts
uses: actions/download-artifact@v7
with:
name: dist
path: dist/
- name: Extract changelog
id: extract-changelog
uses: sean0x42/markdown-extract@v2
with:
file: CHANGELOG.md
pattern: ${{ github.ref_name }}
no-print-matched-heading: "true"
- name: Publish the GitHub Release
uses: softprops/action-gh-release@v2
with:
body: ${{ steps.extract-changelog.outputs.markdown }}
files: dist/*
fail_on_unmatched_files: true