File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : release
2+
3+ on :
4+ workflow_dispatch :
5+ inputs :
6+ bump :
7+ description : Version bump
8+ required : true
9+ default : patch
10+ type : choice
11+ options :
12+ - patch
13+ - minor
14+ - major
15+
16+ jobs :
17+ release :
18+ runs-on : ubuntu-latest
19+ environment : pypi
20+ permissions :
21+ contents : write
22+ id-token : write
23+
24+ steps :
25+ - uses : actions/checkout@v4
26+ with :
27+ ref : master
28+ fetch-depth : 0
29+
30+ - name : Install uv
31+ uses : astral-sh/setup-uv@v6
32+ with :
33+ enable-cache : true
34+
35+ - name : Set up Python
36+ uses : actions/setup-python@v5
37+ with :
38+ python-version : " 3.14"
39+
40+ - name : Install dependencies
41+ run : uv sync --locked --python 3.14
42+
43+ - name : Lint and format with ruff
44+ run : uv run ruff check . && uv run ruff format . --check
45+
46+ - name : Test with pytest
47+ run : uv run pytest
48+
49+ - name : Create release
50+ run : uv run semantic-release version --${{ inputs.bump }}
51+ env :
52+ GH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
53+
54+ - name : Upload assets to GitHub release
55+ run : uv run semantic-release publish
56+ env :
57+ GH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
58+
59+ - name : Publish to PyPI
60+ uses : pypa/gh-action-pypi-publish@release/v1
You can’t perform that action at this time.
0 commit comments