-
Notifications
You must be signed in to change notification settings - Fork 0
63 lines (54 loc) · 1.61 KB
/
release.yml
File metadata and controls
63 lines (54 loc) · 1.61 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
55
56
57
58
59
60
61
62
63
# .github/workflows/release.yml
# Release Workflow - workflow-as-list
# Stack: python-semantic-release
# Triggers: push to main branch (automatic releases)
#
# How it works:
# - On every push to main, semantic-release analyzes commit messages
# - If commits follow Conventional Commits (feat, fix, etc.), it:
# 1. Bumps version according to semver
# 2. Creates git tag
# 3. Generates CHANGELOG.md
# 4. Creates GitHub Release
# 5. Publishes to PyPI (if configured)
#
# Prerequisites:
# - test + lint must pass before merge (enforced by branch protection)
# - All commits must follow Conventional Commits
name: Release
on:
push:
branches:
- main
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: write
issues: write
pull-requests: write
id-token: write
jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
persist-credentials: true
- name: Install uv
uses: astral-sh/setup-uv@v5
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Install dependencies
run: uv sync --frozen
- name: Python Semantic Release
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GIT_AUTHOR_NAME: github-actions[bot]
GIT_AUTHOR_EMAIL: github-actions[bot]@users.noreply.github.com
GIT_COMMITTER_NAME: github-actions[bot]
GIT_COMMITTER_EMAIL: github-actions[bot]@users.noreply.github.com
run: uv run semantic-release version