We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 0327696 commit 5a33879Copy full SHA for 5a33879
.github/workflows/release.yml
@@ -0,0 +1,39 @@
1
+name: Release
2
+
3
+on:
4
+ push:
5
+ tags:
6
+ - v*
7
+ workflow_dispatch:
8
9
+jobs:
10
+ publish:
11
+ runs-on: ubuntu-latest
12
+ timeout-minutes: 5
13
14
+ environment: release
15
16
+ if: startsWith(github.ref, 'refs/tags/v')
17
18
+ steps:
19
+ - uses: actions/checkout@v4
20
21
+ - uses: astral-sh/setup-uv@v5
22
23
+ - run: uv sync --all-extras --dev
24
25
+ - name: Get version
26
+ id: version
27
+ run: |
28
+ echo "VERSION=$(uv run hatch version)" >> $GITHUB_OUTPUT
29
+ echo "TAG_VERSION=${GITHUB_REF#refs/tags/v}" >> $GITHUB_OUTPUT
30
31
+ - name: Check version
32
+ if: steps.version.outputs.VERSION != steps.version.outputs.TAG_VERSION
33
+ run: exit 1
34
35
+ - run: uv build
36
37
+ - run: uv publish
38
+ env:
39
+ UV_PUBLISH_TOKEN: ${{ secrets.UV_PUBLISH_TOKEN }}
0 commit comments