-
Notifications
You must be signed in to change notification settings - Fork 0
60 lines (49 loc) · 1.43 KB
/
release.yml
File metadata and controls
60 lines (49 loc) · 1.43 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
name: Release
on:
workflow_run:
workflows: ["CI"]
types:
- completed
branches:
- main
jobs:
release:
runs-on: ubuntu-latest
if: ${{ github.event.workflow_run.conclusion == 'success' }}
concurrency: release
permissions:
id-token: write
contents: write
steps:
- uses: actions/checkout@v6
with:
fetch-depth: 0
- name: Install uv
uses: astral-sh/setup-uv@v7
- name: Set up Python
run: uv python install 3.13
- name: Install dependencies
run: uv sync --all-extras --dev
- name: Setup Git User
run: |
git config --global user.name "github-actions[bot]"
git config --global user.email "github-actions[bot]@users.noreply.github.com"
- name: Bump version and create changelog
id: cz
run: uv run cz bump --yes
continue-on-error: true
- name: Get Release Tag
id: get_tag
if: steps.cz.outcome == 'success'
run: echo "REVISION=$(git describe --tags --abbrev=0)" >> $GITHUB_ENV
- name: Push Code and Tags
if: steps.cz.outcome == 'success'
run: |
git push origin HEAD:main
git push origin --tags
- name: Create Release
if: steps.cz.outcome == 'success'
uses: softprops/action-gh-release@v2
with:
body_path: "CHANGELOG.md"
tag_name: ${{ env.REVISION }}