-
Notifications
You must be signed in to change notification settings - Fork 17
68 lines (56 loc) · 1.54 KB
/
release.yml
File metadata and controls
68 lines (56 loc) · 1.54 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
name: Release
on:
push:
tags:
- 'v*.*.*'
workflow_dispatch:
inputs:
tag:
description: 'Release tag (e.g. v0.1.0)'
required: true
permissions:
contents: read
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: astral-sh/setup-uv@v7
with:
enable-cache: true
- uses: actions/setup-node@v6
with:
node-version: '22'
cache: npm
cache-dependency-path: ui/package-lock.json
- name: Verify tag matches pyproject.toml version
run: |
REF=${{ github.event.inputs.tag || github.ref_name }}
TOML_VERSION=$(grep '^version' pyproject.toml | cut -d'"' -f2)
TAG_VERSION=${REF#v}
if [ "$TOML_VERSION" != "$TAG_VERSION" ]; then
echo "Error: $REF does not match pyproject.toml version $TOML_VERSION"
exit 1
fi
echo "RELEASE_TAG=$REF" >> $GITHUB_ENV
- name: Build core and bundled wheels
run: make release
- uses: actions/upload-artifact@v7
with:
name: wheels
path: dist/*.whl
github-release:
needs: build
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/download-artifact@v8
with:
name: wheels
path: dist/
- uses: softprops/action-gh-release@v2.5.0
with:
tag_name: ${{ github.event.inputs.tag || github.ref_name }}
files: dist/*.whl
generate_release_notes: true