-
Notifications
You must be signed in to change notification settings - Fork 0
54 lines (44 loc) · 1.56 KB
/
Copy pathrelease.yml
File metadata and controls
54 lines (44 loc) · 1.56 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
name: Release & Publish
on: workflow_dispatch
jobs:
release:
runs-on: ubuntu-latest
concurrency:
group: ${{ github.workflow }}-release-${{ github.ref_name }}
cancel-in-progress: true
permissions:
id-token: write
contents: write
steps:
- name: 🛎️ Checkout repository
uses: actions/checkout@v6
with:
ref: ${{ github.ref_name }}
fetch-depth: 0
- name: 🏷️ Semantic Version Release
id: release
uses: python-semantic-release/python-semantic-release@v10.0.2
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
git_committer_name: "github-actions"
git_committer_email: "actions@users.noreply.github.com"
- name: 🐍 Setup uv & venv
if: steps.release.outputs.released == 'true'
uses: astral-sh/setup-uv@v8.1.0
- name: 📦 Update uv.lock
if: steps.release.outputs.released == 'true'
run: uv lock
- name: 🏗️ Build package (sdist & wheel)
if: steps.release.outputs.released == 'true'
run: uv build --no-sources
- name: 🚀 Publish | Upload to GitHub Release Assets
if: steps.release.outputs.released == 'true'
uses: python-semantic-release/publish-action@v10.5.3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
tag: ${{ steps.release.outputs.tag }}
- name: 🐍 Publish to PyPI
if: steps.release.outputs.released == 'true'
env:
UV_PUBLISH_TOKEN: ${{ secrets.PYPI_TOKEN }}
run: uv publish