Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
e2bdf1a
chore: replace outdated env var with newer standard prefixed version
56kyle Nov 28, 2025
51cc71a
feat: break out demo updates into its own reusable local github actio…
56kyle Nov 28, 2025
85d5b9e
feat: move initial template checkout back into the primary workflows …
56kyle Nov 28, 2025
f98357d
fix: add absolute prefix to custom checkout locations in hopes of fix…
56kyle Nov 28, 2025
e7c3c70
fix: update the location of where the update-demo.yml reusable workfl…
56kyle Nov 28, 2025
c8ae22d
fix: adjust formatting to avoid initial lint error
56kyle Nov 28, 2025
be58c21
fix: remove faulty import
56kyle Nov 28, 2025
a7a3776
feat: add initial implementation of the calendar version release cicd
56kyle Nov 30, 2025
34fc165
docs: update CONTRIBUTING.md info
56kyle Nov 30, 2025
4345fa5
docs: fix pre-commit install method in CONTRIBUTING.md
56kyle Nov 30, 2025
7d4cc40
refactor: move get_current_version into bump-version script to avoid …
56kyle Nov 30, 2025
e2940a7
refactor: move tag-version into its own script for the time being
56kyle Nov 30, 2025
782ea9b
chore: update uv.lock
56kyle Nov 30, 2025
3483e9e
fix: replace uv run call in update-demo nox session with install_and_…
56kyle Nov 30, 2025
58f3520
fix: update names throughout nox session and file along with fix upda…
56kyle Nov 30, 2025
8017439
chore: manually set environ variable in pytest demos_folder fixture s…
56kyle Nov 30, 2025
bf45c15
feat: add initial implementation of setup-release nox session and cor…
56kyle Nov 30, 2025
63ebafa
feat: add check for when the template is already in sync with the demo
56kyle Nov 30, 2025
fd27f00
fix: remove github.workspace from uses path
56kyle Nov 30, 2025
c940656
fix: change paths pointing toward update-demo reusable workflow
56kyle Nov 30, 2025
7748072
chore: lint a few scripts
56kyle Nov 30, 2025
e129799
fix: tweak gitlab ci to not error from too many uv cache keyfiles bei…
56kyle Nov 30, 2025
2f4adf2
chore: alter initial checkout location to see if it fixes actions ref…
56kyle Dec 1, 2025
e74104f
chore: remove path provided to see if it fixes reference issues
56kyle Dec 1, 2025
13bf965
fix: move reusable workflow usage to the job level and piece together…
56kyle Dec 1, 2025
6097e9c
fix: set references to python version file as absolute positions due …
56kyle Dec 1, 2025
0198495
feat: add small check to gracefully exit when trying to create an exi…
56kyle Dec 1, 2025
bda6c83
fix: swap to nox session install and run script for merge-demo-featur…
56kyle Dec 1, 2025
7969d23
feat: add default option to use current branch and add placeholder de…
56kyle Dec 1, 2025
e4bf34d
fix: change type of demos_cache_folder to prevent validation error fo…
56kyle Dec 1, 2025
1df0744
fix: add missing demo env info pass through into nox session install …
56kyle Dec 1, 2025
c414c81
feat: remove unneeded prior install now that PEP 723 is being used
56kyle Dec 1, 2025
9197f20
fix: remove faulty quotes in jq expression for merge-demo-feature script
56kyle Dec 1, 2025
d5b8fe5
fix: specify --merge in merge-demo-feature script attempt at merging …
56kyle Dec 1, 2025
a0c6460
Merge pull request #69 from robust-python/feature/add-calver-release-…
56kyle Dec 1, 2025
90a9ec1
fix: add missing cruft dependency to PEP 723 block of the setup-relea…
56kyle Dec 1, 2025
f80069a
fix: replace --no-tag with --files-only since that actually exists
56kyle Dec 1, 2025
d4e0f31
chore: add a couple of random undesired reference files to the gitign…
56kyle Dec 1, 2025
fba8b5d
feat: add uv sync call to setup-release script to ensure lockfile get…
56kyle Dec 1, 2025
4924dca
bump: version 2025.11.0 → 2025.12.0
56kyle Dec 1, 2025
7403db4
fix: remove accidentally left in broken syntax
56kyle Dec 1, 2025
d9c3de6
fix: replace get-release-notes nox session run of script with install…
56kyle Dec 1, 2025
229f005
fix: add venv for get-release-notes for time being
56kyle Dec 1, 2025
a31b5aa
fix: add missing dependencies to get-release-notes script
56kyle Dec 1, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .cz.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[tool.commitizen]
tag_format = "v$version"
version_provider = "pep621"
update_changelog_on_bump = true
1 change: 1 addition & 0 deletions .github/workflows/.python-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
3.10
56 changes: 56 additions & 0 deletions .github/workflows/merge-demo-feature.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
name: merge-demo-feature.yml
on:
push:
branches:
- develop

env:
COOKIECUTTER_ROBUST_PYTHON__DEMOS_CACHE_FOLDER: ${{ github.workspace }}
COOKIECUTTER_ROBUST_PYTHON__APP_AUTHOR: ${{ github.repository_owner }}
ROBUST_PYTHON_DEMO__APP_AUTHOR: ${{ github.repository_owner }}
ROBUST_MATURIN_DEMO__APP_AUTHOR: ${{ github.repository_owner }}

jobs:
update-demo:
name: Update Demo
uses: ./.github/workflows/update-demo.yml
strategy:
matrix:
demo_name:
- "robust-python-demo"
- "robust-maturin-demo"
with:
demo_name: ${{ matrix.demo_name }}

merge-demo-feature:
name: Merge Demo Feature
runs-on: ubuntu-latest
strategy:
matrix:
demo_name:
- "robust-python-demo"
- "robust-maturin-demo"
steps:
- name: Checkout Template
uses: actions/checkout@v4
with:
repository: ${{ github.repository }}

- name: Checkout Demo
uses: actions/checkout@v4
with:
repository: "${{ github.repository_owner }}/${{ inputs.demo_name }}"
path: ${{ inputs.demo_name }}
ref: develop

- name: Set up uv
uses: astral-sh/setup-uv@v6

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version-file: "${{ github.workspace }}/cookiecutter-robust-python/.github/workflows/.python-version"

- name: Merge Demo Feature PR into Develop
working-directory: "${{ github.workspace }}/${{ matrix.demo_name }}"
run: "uvx nox -s merge-demo-feature(${{ matrix.demo_name }}) -- ${{ github.head_ref }}"
52 changes: 52 additions & 0 deletions .github/workflows/prepare-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: Prepare Release

on:
push:
branches:
- "release/*"

permissions:
contents: write

jobs:
prepare-release:
name: Prepare Release
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0
fetch-tags: true

- name: Set up uv
uses: astral-sh/setup-uv@v6

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version-file: .github/workflows/.python-version

- name: Get Current Version
id: current_version
run: echo "CURRENT_VERSION=$(uvx --from commitizen cz version -p)" >> $GITHUB_OUTPUT

- name: Get New Release Version
id: new_version
run: echo "NEW_VERSION=${GITHUB_REF_NAME#release/}" >> $GITHUB_OUTPUT

- name: Bump Version
if: ${{ steps.current_version.outputs.CURRENT_VERSION != steps.new_version.outputs.NEW_VERSION }}
run: uvx nox -s bump-version ${{ steps.new_version.outputs.NEW_VERSION }}

- name: Get Release Notes
run: uvx nox -s get-release-notes -- ${{ github.workspace }}-CHANGELOG.md

- name: Create Release Draft
uses: softprops/action-gh-release@v2
with:
body_path: ${{ github.workspace }}-CHANGELOG.md
draft: true
tag_name: v${{ steps.new_version.outputs.NEW_VERSION }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
147 changes: 147 additions & 0 deletions .github/workflows/release-template.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,147 @@
# .github/workflows/release-template.yml
# Automated release workflow for the cookiecutter-robust-python template
# Uses Calendar Versioning (CalVer): YYYY.MM.MICRO

name: Release Template

on:
push:
branches:
- main

workflow_dispatch:
inputs:
micro_version:
description: 'Override micro version (leave empty for auto-increment)'
required: false
type: string

jobs:
bump_and_build:
name: Bump Version & Build
runs-on: ubuntu-latest
outputs:
version: ${{ steps.version.outputs.VERSION }}
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0
fetch-tags: true

- name: Set up uv
uses: astral-sh/setup-uv@v6

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version-file: ".github/workflows/.python-version"

- name: Configure Git
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"

- name: Bump version and generate changelog
run: |
if [ -n "${{ inputs.micro_version }}" ]; then
uvx nox -s bump-version -- ${{ inputs.micro_version }}
else
uvx nox -s bump-version
fi

- name: Get version
id: version
run: |
VERSION=$(uvx --from commitizen cz version -p)
echo "VERSION=$VERSION" >> $GITHUB_OUTPUT

- name: Push version bump commit
run: git push origin HEAD

- name: Build packages
run: uvx nox -s build-python

- name: Upload build artifacts
uses: actions/upload-artifact@v4
with:
name: dist-${{ steps.version.outputs.VERSION }}
path: dist/
retention-days: 7

publish_testpypi:
name: Publish to TestPyPI
runs-on: ubuntu-latest
needs: bump_and_build
permissions:
id-token: write
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up uv
uses: astral-sh/setup-uv@v6

- name: Download build artifacts
uses: actions/download-artifact@v4
with:
name: dist-${{ needs.bump_and_build.outputs.version }}
path: dist/

- name: Publish to TestPyPI
run: uvx nox -s publish-python -- --test-pypi

publish_pypi:
name: Tag & Publish to PyPI
runs-on: ubuntu-latest
needs: [bump_and_build, publish_testpypi]
permissions:
id-token: write
contents: write
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0
ref: main

- name: Set up uv
uses: astral-sh/setup-uv@v6

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version-file: ".github/workflows/.python-version"

- name: Configure Git
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"

- name: Pull latest (includes version bump)
run: git pull origin main

- name: Download build artifacts
uses: actions/download-artifact@v4
with:
name: dist-${{ needs.bump_and_build.outputs.version }}
path: dist/

- name: Create and push tag
run: uvx nox -s tag-version -- push

- name: Publish to PyPI
run: uvx nox -s publish-python

- name: Extract release notes
run: uvx nox -s get-release-notes -- release_notes.md

- name: Create GitHub Release
uses: softprops/action-gh-release@v2
with:
tag_name: v${{ needs.bump_and_build.outputs.version }}
name: v${{ needs.bump_and_build.outputs.version }}
body_path: release_notes.md
files: dist/*
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
37 changes: 3 additions & 34 deletions .github/workflows/sync-demos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,45 +4,14 @@ on:
branches:
- develop

env:
COOKIECUTTER_ROBUST_PYTHON_PROJECT_DEMOS_FOLDER: ${{ github.workspace }}
COOKIECUTTER_ROBUST_PYTHON__DEMOS_CACHE_FOLDER: ${{ github.workspace }}
COOKIECUTTER_ROBUST_PYTHON__APP_AUTHOR: ${{ github.repository_owner }}
ROBUST_PYTHON_DEMO__APP_AUTHOR: ${{ github.repository_owner }}
ROBUST_MATURIN_DEMO__APP_AUTHOR: ${{ github.repository_owner }}

jobs:
update-demo:
name: Update Demo
runs-on: ubuntu-latest

uses: ./.github/workflows/update-demo.yml
strategy:
matrix:
demo_name:
- "robust-python-demo"
- "robust-maturin-demo"
steps:
- name: Checkout Template
uses: actions/checkout@v4
with:
repository: ${{ github.repository }}
path: cookiecutter-robust-python

- name: Checkout Demo
uses: actions/checkout@v4
with:
repository: "${{ github.repository_owner }}/${{ matrix.demo_name }}"
path: ${{ matrix.demo_name }}
ref: develop

- name: Set up uv
uses: astral-sh/setup-uv@v6

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

- name: Update Demo
working-directory: "${{ github.workspace }}/cookiecutter-robust-python"
run: "uvx nox -s 'update-demo(${{ matrix.demo_name }})' -- --branch-override ${{ github.head_ref }}"
with:
demo_name: ${{ matrix.demo_name }}
42 changes: 42 additions & 0 deletions .github/workflows/update-demo.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: update-demo.yml
on:
workflow_call:
inputs:
demo_name:
required: true
type: string

env:
COOKIECUTTER_ROBUST_PYTHON__DEMOS_CACHE_FOLDER: ${{ github.workspace }}
COOKIECUTTER_ROBUST_PYTHON__APP_AUTHOR: ${{ github.repository_owner }}
ROBUST_PYTHON_DEMO__APP_AUTHOR: ${{ github.repository_owner }}
ROBUST_MATURIN_DEMO__APP_AUTHOR: ${{ github.repository_owner }}

jobs:
update-demo:
runs-on: ubuntu-latest
steps:
- name: Checkout Template
uses: actions/checkout@v4
with:
repository: ${{ github.repository }}
path: "${{ github.workspace }}/cookiecutter-robust-python"

- name: Checkout Demo
uses: actions/checkout@v4
with:
repository: "${{ github.repository_owner }}/${{ inputs.demo_name }}"
path: ${{ inputs.demo_name }}
ref: develop

- name: Set up uv
uses: astral-sh/setup-uv@v6

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version-file: "${{ github.workspace }}/cookiecutter-robust-python/.github/workflows/.python-version"

- name: Update Demo
working-directory: "${{ github.workspace }}/cookiecutter-robust-python"
run: "uvx nox -s 'update-demo(${{ inputs.demo_name }})' -- --branch-override ${{ github.head_ref }}"
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -67,3 +67,6 @@ nohup.out
.env.local

/.idea/
CLAUDE*.md
example.yml
/.claude/*
Loading