-
Notifications
You must be signed in to change notification settings - Fork 0
118 lines (112 loc) · 3.11 KB
/
tag.yml
File metadata and controls
118 lines (112 loc) · 3.11 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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
---
name: tag
on:
push:
tags:
- "*.*.*"
jobs:
build:
runs-on: ubuntu-24.04
steps:
- name: Clone full tree, and checkout tag
uses: actions/checkout@v5
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.17"
- name: Build source dist and wheels
run: uv build
- name: Upload source dist and wheels to artifacts
uses: actions/upload-artifact@v4
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@v5
with:
fetch-depth: 0
- name: Download source dist and wheels from artifacts
uses: actions/download-artifact@v4
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.17"
- 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@v5
- name: Download source dist and wheels from artifacts
uses: actions/download-artifact@v4
with:
name: dist
path: dist/
- name: Extract changelog
id: extract-changelog
uses: sean0x42/markdown-extract@v2
with:
file: docs/changelog.md
pattern: ${{ github.ref_name }}
- 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
publish-github-pages:
runs-on: ubuntu-24.04
permissions:
contents: write
steps:
- name: Clone full tree, and checkout branch
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Configure git user
run: |
git config --global user.name "${GITHUB_ACTOR}"
git config --global user.email "${GITHUB_ACTOR}@users.noreply.github.com"
- 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.17"
- name: Create virtual environment
run: uv sync --only-dev
- name: Publish the docs to GitHub Pages
run: uv run mike deploy --push --update-aliases "${{ github.ref_name }}" latest
- name: List available docs versions
run: uv run mike list