-
Notifications
You must be signed in to change notification settings - Fork 0
36 lines (28 loc) · 1005 Bytes
/
release.yaml
File metadata and controls
36 lines (28 loc) · 1005 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
name: Auto Release & Publish
on:
push:
branches: [master]
jobs:
release:
runs-on: ubuntu-latest
permissions:
id-token: write # MANDATORY for PyPI Trusted Publishing
contents: write # MANDATORY for Semantic Release to push tags/commits
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0 # Required to read the git commit history
- name: Install uv
uses: astral-sh/setup-uv@v5
- name: Set up Python
run: uv python install 3.12
- name: Python Semantic Release
id: semantic
uses: python-semantic-release/python-semantic-release@v9
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
# The step above automatically runs `uv build` (because we set it in pyproject.toml)
# BUT it only does this IF there are commits that trigger a release (feat:, fix:, etc.)
- name: Publish to PyPI
if: steps.semantic.outputs.released == 'true'
run: uv publish