-
Notifications
You must be signed in to change notification settings - Fork 0
73 lines (59 loc) · 1.91 KB
/
release.yml
File metadata and controls
73 lines (59 loc) · 1.91 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
name: release
on:
push:
tags:
- "v*"
permissions:
contents: read
id-token: write
attestations: write
jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: Set up Python 3.14
uses: actions/setup-python@v6
with:
python-version: "3.14"
- name: Install uv
uses: astral-sh/setup-uv@v7
with:
enable-cache: true
- name: Resolve release metadata
id: release
run: |
python - <<'PY' "${GITHUB_REF_NAME}" >> "${GITHUB_OUTPUT}"
import json
import pathlib
import sys
sys.path.insert(0, str(pathlib.Path("scripts/ci").resolve()))
import package_tools
metadata = package_tools.release_metadata(sys.argv[1])
for key, value in metadata.items():
print(f"{key}={value}")
PY
- name: Install workspace dependencies
run: uv sync --all-packages --all-extras --group dev
- name: Validate lockstep versions
run: uv run python scripts/ci/package_tools.py check-versions
- name: Build publishable packages
run: |
rm -rf dist
mkdir -p dist
while IFS= read -r package; do
uv build --package "$package" --out-dir dist
done < <(uv run python scripts/ci/package_tools.py print-packages)
- name: Validate distributions with twine
run: uvx twine check dist/*
- name: Smoke test publishable packages
run: |
while IFS= read -r package; do
uv run python scripts/ci/package_tools.py smoke "$package" --dist-dir dist
done < <(uv run python scripts/ci/package_tools.py print-packages)
- name: Publish packages
uses: pypa/gh-action-pypi-publish@release/v1
with:
attestations: true
packages-dir: dist/
skip-existing: true