Skip to content

Commit fe3de30

Browse files
committed
Merge branch 'main' into build/delete-ref-folder
2 parents dae1e9a + 72b7bca commit fe3de30

File tree

5 files changed

+100
-3
lines changed

5 files changed

+100
-3
lines changed

.cz.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[tool.commitizen]
2-
version = "0.15.9"
2+
version = "0.16.0"
33
bump_message = "build(version): :bookmark: update version from $current_version to $new_version"
44
version_schema = "semver"
55
version_provider = "commitizen"

CHANGELOG.md

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
## 0.16.0 (2025-08-26)
2+
3+
### Feat
4+
5+
- :sparkles: add `update-from-template` workflow (#134)
6+
- :sparkles: add hosting provider variable (#153)
7+
- :memo: add Conduct, Contributing, and filled out README (#131)
8+
- :sparkles: add 404 page to template (#141)
9+
- :sparkles: add files with copier variables (#127)
10+
- :sparkles: copy over static files to template folder (#117)
11+
- :hammer: gitleaks pre-commit to check for credentials (#100)
12+
- :sparkles: add mypy to VS Code settings and extensions (#93)
13+
- :sparkles: add examples section to docstring template (#39)
14+
- 🧑‍💻 add recipe `add-function` (#2)
15+
16+
### Fix
17+
18+
- :bug: need to run build workflow after version bump to get changelog (#110)
19+
- :construction_worker: explicitly checkout newest version to publish (#107)
20+
- :construction_worker: forgot to checkout before building and publishing (#106)
21+
- :construction_worker: only run when previous and current versions are different (#98)
22+
- :construction_worker: use the `has_released` output to run or not (#97)
23+
- :bug: install uv in publish step and only for tags (#96)
24+
- :hammer: the `check-commits` recipe wasn't correctly checking them (#48)
25+
- :hammer: the `check-commits` recipe wasn't correctly checking them
26+
- :bug: remove auto-built reference docs before/after building (#47)
27+
- :bug: remove auto-built reference docs before/after building
28+
- :fire: remove django debugger (#44)
29+
- add `test-python` to `run-all` (#38)
30+
- :hammer: update test snippet to given, when, then (#29)
31+
32+
### Refactor
33+
34+
- :recycle: specify svg for all badges (#157)
35+
- :recycle: move copier test to own file (#156)
36+
- :recycle: update post-copy message (#154)
37+
- :recycle: match copier vars in `template-website` (#152)
38+
- :recycle: use `bash` for `check-commits` justfile recipe (#150)
39+
- :wrench: include `github-actions` in dependabot config (#136)
40+
- :construction_worker: move `uv build` step into publish job (#101)
41+
- :recycle: make mypy more strict in settings (#94)
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
name: Update from template
2+
3+
on:
4+
workflow_dispatch:
5+
schedule:
6+
# Every day at 3:30 at night.
7+
- cron: '30 3 * * *'
8+
9+
# Limit token permissions for security
10+
permissions: read-all
11+
12+
jobs:
13+
update-from-template:
14+
runs-on: ubuntu-latest
15+
permissions:
16+
pull-requests: write
17+
steps:
18+
- name: Harden the runner (Audit all outbound calls)
19+
uses: step-security/harden-runner@0634a2670c59f64b4a01f0f96f84700a4088b9f0 # v2.12.0
20+
with:
21+
egress-policy: audit
22+
23+
- name: Check out repository
24+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
25+
26+
- name: Install Python
27+
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
28+
with:
29+
python-version: "3.13"
30+
31+
- name: Install dependencies
32+
run: |
33+
sudo apt install pipx
34+
pipx ensurepath
35+
pipx install uv rust-just copier
36+
37+
- name: Set User
38+
run: |
39+
git config user.name "github-actions[bot]"
40+
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
41+
42+
- name: Pull request with updates from template
43+
run: |
44+
just update-from-template
45+
any_changes=$(git status --porcelain=v1 2>/dev/null | wc -l)
46+
if [ "$any_changes" -eq 0 ]; then
47+
echo "No updates from the template detected, and no changes found. Stopping and exiting."
48+
exit 0
49+
fi
50+
git checkout -b chore/update-from-template
51+
git add .
52+
git commit -m "chore(sync): :hammer: update changes from template"
53+
gh pr create \
54+
--title "chore(sync): :hammer: update changes from template" \
55+
--body "This PR is automatically generated by the 'update-from-template' workflow. It syncs the latest changes from the template repository with this repository."

template/justfile.jinja

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,8 @@ build-contributors:
116116

117117
# Check for and apply updates from the template
118118
update-from-template:
119-
uvx copier update --trust --defaults
119+
# Do not update existing source files
120+
uvx copier update --trust --defaults $(find src/{{ github_repo_snake_case }} -type f -printf "--exclude %p ")
120121

121122
# Reset repo changes to match the template
122123
reset-from-template:
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
# Changes here will be overwritten by Copier; NEVER EDIT MANUALLY
2-
{{ dict(_copier_answers, copyright_year=copyright_year) | to_nice_yaml -}}
2+
{{ dict(_copier_answers, github_repo=github_repo, copyright_year=copyright_year) | to_nice_yaml -}}

0 commit comments

Comments
 (0)