File tree Expand file tree Collapse file tree 1 file changed +39
-0
lines changed
Expand file tree Collapse file tree 1 file changed +39
-0
lines changed Original file line number Diff line number Diff line change 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 }}
You can’t perform that action at this time.
0 commit comments