-
-
Notifications
You must be signed in to change notification settings - Fork 0
37 lines (28 loc) · 783 Bytes
/
release.yml
File metadata and controls
37 lines (28 loc) · 783 Bytes
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
name: Release
on:
push:
tags:
- v*
workflow_dispatch:
jobs:
publish:
runs-on: ubuntu-latest
environment: release
timeout-minutes: 5
if: startsWith(github.ref, 'refs/tags/v')
steps:
- uses: actions/checkout@v6
- uses: astral-sh/setup-uv@v7
- run: uv sync --all-extras --dev
- name: Get version
id: version
run: |
echo "VERSION=$(uv run hatch version)" >> $GITHUB_OUTPUT
echo "TAG_VERSION=${GITHUB_REF#refs/tags/v}" >> $GITHUB_OUTPUT
- name: Check version
if: steps.version.outputs.VERSION != steps.version.outputs.TAG_VERSION
run: exit 1
- run: uv build
- run: uv publish
env:
UV_PUBLISH_TOKEN: ${{ secrets.UV_PUBLISH_TOKEN }}