Skip to content

Commit 363842d

Browse files
authored
Merge pull request #70 from robust-python/release/2025.12.0
Release/2025.12.0
2 parents 6280c79 + a31b5aa commit 363842d

24 files changed

+1427
-106
lines changed

.cz.toml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
[tool.commitizen]
2+
tag_format = "v$version"
3+
version_provider = "pep621"
4+
update_changelog_on_bump = true

.github/workflows/.python-version

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
3.10
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
name: merge-demo-feature.yml
2+
on:
3+
push:
4+
branches:
5+
- develop
6+
7+
env:
8+
COOKIECUTTER_ROBUST_PYTHON__DEMOS_CACHE_FOLDER: ${{ github.workspace }}
9+
COOKIECUTTER_ROBUST_PYTHON__APP_AUTHOR: ${{ github.repository_owner }}
10+
ROBUST_PYTHON_DEMO__APP_AUTHOR: ${{ github.repository_owner }}
11+
ROBUST_MATURIN_DEMO__APP_AUTHOR: ${{ github.repository_owner }}
12+
13+
jobs:
14+
update-demo:
15+
name: Update Demo
16+
uses: ./.github/workflows/update-demo.yml
17+
strategy:
18+
matrix:
19+
demo_name:
20+
- "robust-python-demo"
21+
- "robust-maturin-demo"
22+
with:
23+
demo_name: ${{ matrix.demo_name }}
24+
25+
merge-demo-feature:
26+
name: Merge Demo Feature
27+
runs-on: ubuntu-latest
28+
strategy:
29+
matrix:
30+
demo_name:
31+
- "robust-python-demo"
32+
- "robust-maturin-demo"
33+
steps:
34+
- name: Checkout Template
35+
uses: actions/checkout@v4
36+
with:
37+
repository: ${{ github.repository }}
38+
39+
- name: Checkout Demo
40+
uses: actions/checkout@v4
41+
with:
42+
repository: "${{ github.repository_owner }}/${{ inputs.demo_name }}"
43+
path: ${{ inputs.demo_name }}
44+
ref: develop
45+
46+
- name: Set up uv
47+
uses: astral-sh/setup-uv@v6
48+
49+
- name: Set up Python
50+
uses: actions/setup-python@v5
51+
with:
52+
python-version-file: "${{ github.workspace }}/cookiecutter-robust-python/.github/workflows/.python-version"
53+
54+
- name: Merge Demo Feature PR into Develop
55+
working-directory: "${{ github.workspace }}/${{ matrix.demo_name }}"
56+
run: "uvx nox -s merge-demo-feature(${{ matrix.demo_name }}) -- ${{ github.head_ref }}"
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
name: Prepare Release
2+
3+
on:
4+
push:
5+
branches:
6+
- "release/*"
7+
8+
permissions:
9+
contents: write
10+
11+
jobs:
12+
prepare-release:
13+
name: Prepare Release
14+
runs-on: ubuntu-latest
15+
steps:
16+
- name: Checkout code
17+
uses: actions/checkout@v4
18+
with:
19+
fetch-depth: 0
20+
fetch-tags: true
21+
22+
- name: Set up uv
23+
uses: astral-sh/setup-uv@v6
24+
25+
- name: Set up Python
26+
uses: actions/setup-python@v5
27+
with:
28+
python-version-file: .github/workflows/.python-version
29+
30+
- name: Get Current Version
31+
id: current_version
32+
run: echo "CURRENT_VERSION=$(uvx --from commitizen cz version -p)" >> $GITHUB_OUTPUT
33+
34+
- name: Get New Release Version
35+
id: new_version
36+
run: echo "NEW_VERSION=${GITHUB_REF_NAME#release/}" >> $GITHUB_OUTPUT
37+
38+
- name: Bump Version
39+
if: ${{ steps.current_version.outputs.CURRENT_VERSION != steps.new_version.outputs.NEW_VERSION }}
40+
run: uvx nox -s bump-version ${{ steps.new_version.outputs.NEW_VERSION }}
41+
42+
- name: Get Release Notes
43+
run: uvx nox -s get-release-notes -- ${{ github.workspace }}-CHANGELOG.md
44+
45+
- name: Create Release Draft
46+
uses: softprops/action-gh-release@v2
47+
with:
48+
body_path: ${{ github.workspace }}-CHANGELOG.md
49+
draft: true
50+
tag_name: v${{ steps.new_version.outputs.NEW_VERSION }}
51+
env:
52+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Lines changed: 147 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,147 @@
1+
# .github/workflows/release-template.yml
2+
# Automated release workflow for the cookiecutter-robust-python template
3+
# Uses Calendar Versioning (CalVer): YYYY.MM.MICRO
4+
5+
name: Release Template
6+
7+
on:
8+
push:
9+
branches:
10+
- main
11+
12+
workflow_dispatch:
13+
inputs:
14+
micro_version:
15+
description: 'Override micro version (leave empty for auto-increment)'
16+
required: false
17+
type: string
18+
19+
jobs:
20+
bump_and_build:
21+
name: Bump Version & Build
22+
runs-on: ubuntu-latest
23+
outputs:
24+
version: ${{ steps.version.outputs.VERSION }}
25+
steps:
26+
- name: Checkout code
27+
uses: actions/checkout@v4
28+
with:
29+
fetch-depth: 0
30+
fetch-tags: true
31+
32+
- name: Set up uv
33+
uses: astral-sh/setup-uv@v6
34+
35+
- name: Set up Python
36+
uses: actions/setup-python@v5
37+
with:
38+
python-version-file: ".github/workflows/.python-version"
39+
40+
- name: Configure Git
41+
run: |
42+
git config user.name "github-actions[bot]"
43+
git config user.email "github-actions[bot]@users.noreply.github.com"
44+
45+
- name: Bump version and generate changelog
46+
run: |
47+
if [ -n "${{ inputs.micro_version }}" ]; then
48+
uvx nox -s bump-version -- ${{ inputs.micro_version }}
49+
else
50+
uvx nox -s bump-version
51+
fi
52+
53+
- name: Get version
54+
id: version
55+
run: |
56+
VERSION=$(uvx --from commitizen cz version -p)
57+
echo "VERSION=$VERSION" >> $GITHUB_OUTPUT
58+
59+
- name: Push version bump commit
60+
run: git push origin HEAD
61+
62+
- name: Build packages
63+
run: uvx nox -s build-python
64+
65+
- name: Upload build artifacts
66+
uses: actions/upload-artifact@v4
67+
with:
68+
name: dist-${{ steps.version.outputs.VERSION }}
69+
path: dist/
70+
retention-days: 7
71+
72+
publish_testpypi:
73+
name: Publish to TestPyPI
74+
runs-on: ubuntu-latest
75+
needs: bump_and_build
76+
permissions:
77+
id-token: write
78+
steps:
79+
- name: Checkout code
80+
uses: actions/checkout@v4
81+
82+
- name: Set up uv
83+
uses: astral-sh/setup-uv@v6
84+
85+
- name: Download build artifacts
86+
uses: actions/download-artifact@v4
87+
with:
88+
name: dist-${{ needs.bump_and_build.outputs.version }}
89+
path: dist/
90+
91+
- name: Publish to TestPyPI
92+
run: uvx nox -s publish-python -- --test-pypi
93+
94+
publish_pypi:
95+
name: Tag & Publish to PyPI
96+
runs-on: ubuntu-latest
97+
needs: [bump_and_build, publish_testpypi]
98+
permissions:
99+
id-token: write
100+
contents: write
101+
steps:
102+
- name: Checkout code
103+
uses: actions/checkout@v4
104+
with:
105+
fetch-depth: 0
106+
ref: main
107+
108+
- name: Set up uv
109+
uses: astral-sh/setup-uv@v6
110+
111+
- name: Set up Python
112+
uses: actions/setup-python@v5
113+
with:
114+
python-version-file: ".github/workflows/.python-version"
115+
116+
- name: Configure Git
117+
run: |
118+
git config user.name "github-actions[bot]"
119+
git config user.email "github-actions[bot]@users.noreply.github.com"
120+
121+
- name: Pull latest (includes version bump)
122+
run: git pull origin main
123+
124+
- name: Download build artifacts
125+
uses: actions/download-artifact@v4
126+
with:
127+
name: dist-${{ needs.bump_and_build.outputs.version }}
128+
path: dist/
129+
130+
- name: Create and push tag
131+
run: uvx nox -s tag-version -- push
132+
133+
- name: Publish to PyPI
134+
run: uvx nox -s publish-python
135+
136+
- name: Extract release notes
137+
run: uvx nox -s get-release-notes -- release_notes.md
138+
139+
- name: Create GitHub Release
140+
uses: softprops/action-gh-release@v2
141+
with:
142+
tag_name: v${{ needs.bump_and_build.outputs.version }}
143+
name: v${{ needs.bump_and_build.outputs.version }}
144+
body_path: release_notes.md
145+
files: dist/*
146+
env:
147+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/sync-demos.yml

Lines changed: 3 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -4,45 +4,14 @@ on:
44
branches:
55
- develop
66

7-
env:
8-
COOKIECUTTER_ROBUST_PYTHON_PROJECT_DEMOS_FOLDER: ${{ github.workspace }}
9-
COOKIECUTTER_ROBUST_PYTHON__DEMOS_CACHE_FOLDER: ${{ github.workspace }}
10-
COOKIECUTTER_ROBUST_PYTHON__APP_AUTHOR: ${{ github.repository_owner }}
11-
ROBUST_PYTHON_DEMO__APP_AUTHOR: ${{ github.repository_owner }}
12-
ROBUST_MATURIN_DEMO__APP_AUTHOR: ${{ github.repository_owner }}
13-
147
jobs:
158
update-demo:
169
name: Update Demo
17-
runs-on: ubuntu-latest
18-
10+
uses: ./.github/workflows/update-demo.yml
1911
strategy:
2012
matrix:
2113
demo_name:
2214
- "robust-python-demo"
2315
- "robust-maturin-demo"
24-
steps:
25-
- name: Checkout Template
26-
uses: actions/checkout@v4
27-
with:
28-
repository: ${{ github.repository }}
29-
path: cookiecutter-robust-python
30-
31-
- name: Checkout Demo
32-
uses: actions/checkout@v4
33-
with:
34-
repository: "${{ github.repository_owner }}/${{ matrix.demo_name }}"
35-
path: ${{ matrix.demo_name }}
36-
ref: develop
37-
38-
- name: Set up uv
39-
uses: astral-sh/setup-uv@v6
40-
41-
- name: Set up Python
42-
uses: actions/setup-python@v5
43-
with:
44-
python-version: ${{ matrix.python-version }}
45-
46-
- name: Update Demo
47-
working-directory: "${{ github.workspace }}/cookiecutter-robust-python"
48-
run: "uvx nox -s 'update-demo(${{ matrix.demo_name }})' -- --branch-override ${{ github.head_ref }}"
16+
with:
17+
demo_name: ${{ matrix.demo_name }}

.github/workflows/update-demo.yml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: update-demo.yml
2+
on:
3+
workflow_call:
4+
inputs:
5+
demo_name:
6+
required: true
7+
type: string
8+
9+
env:
10+
COOKIECUTTER_ROBUST_PYTHON__DEMOS_CACHE_FOLDER: ${{ github.workspace }}
11+
COOKIECUTTER_ROBUST_PYTHON__APP_AUTHOR: ${{ github.repository_owner }}
12+
ROBUST_PYTHON_DEMO__APP_AUTHOR: ${{ github.repository_owner }}
13+
ROBUST_MATURIN_DEMO__APP_AUTHOR: ${{ github.repository_owner }}
14+
15+
jobs:
16+
update-demo:
17+
runs-on: ubuntu-latest
18+
steps:
19+
- name: Checkout Template
20+
uses: actions/checkout@v4
21+
with:
22+
repository: ${{ github.repository }}
23+
path: "${{ github.workspace }}/cookiecutter-robust-python"
24+
25+
- name: Checkout Demo
26+
uses: actions/checkout@v4
27+
with:
28+
repository: "${{ github.repository_owner }}/${{ inputs.demo_name }}"
29+
path: ${{ inputs.demo_name }}
30+
ref: develop
31+
32+
- name: Set up uv
33+
uses: astral-sh/setup-uv@v6
34+
35+
- name: Set up Python
36+
uses: actions/setup-python@v5
37+
with:
38+
python-version-file: "${{ github.workspace }}/cookiecutter-robust-python/.github/workflows/.python-version"
39+
40+
- name: Update Demo
41+
working-directory: "${{ github.workspace }}/cookiecutter-robust-python"
42+
run: "uvx nox -s 'update-demo(${{ inputs.demo_name }})' -- --branch-override ${{ github.head_ref }}"

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,3 +67,6 @@ nohup.out
6767
.env.local
6868

6969
/.idea/
70+
CLAUDE*.md
71+
example.yml
72+
/.claude/*

0 commit comments

Comments
 (0)