-
Notifications
You must be signed in to change notification settings - Fork 0
51 lines (42 loc) · 1.38 KB
/
Copy pathrelease.yml
File metadata and controls
51 lines (42 loc) · 1.38 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
name: Release
on:
push:
branches:
- master
- main
permissions:
contents: write
jobs:
release:
name: Semantic Release
runs-on: ubuntu-latest
# Only run if the commit is NOT from semantic-release itself
if: "!contains(github.event.head_commit.message, 'Automatically generated by python-semantic-release')"
concurrency: release
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
submodules: recursive
token: ${{ secrets.GITHUB_TOKEN }}
- uses: actions/setup-python@v5
with:
python-version: "3.12"
- uses: astral-sh/setup-uv@v5
- uses: dtolnay/rust-toolchain@stable
- name: Install dependencies
run: uv sync --group dev --no-install-project
- name: Python Semantic Release
id: release
run: uv run --no-project python -m semantic_release version
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Print release info
if: steps.release.outcome == 'success'
run: |
echo "✅ Release completed"
echo "Tag: ${{ steps.release.outputs.tag }}"
echo "Version: ${{ steps.release.outputs.version }}"
echo "Major: ${{ steps.release.outputs.major }}"
echo "Minor: ${{ steps.release.outputs.minor }}"
echo "Patch: ${{ steps.release.outputs.patch }}"