Skip to content

Commit 79b1d32

Browse files
committed
chore(copier): update shared and release templates
Refresh generated shared/release workflow files, add shared mise and Tombi/Rumdl configuration, and pin generated helper task URLs to the template revision. Update the Python template for TOML/Jinja linting, ty-based lint checks, and a placeholder README.
1 parent 05a54fb commit 79b1d32

18 files changed

Lines changed: 138 additions & 208 deletions
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
# This file is @generated by <https://github.com/liblaf/copier-release>.
22
# DO NOT EDIT!
3-
_commit: v0.2.8
3+
_commit: v0.3.0
44
_src_path: gh:liblaf/copier-release

.config/copier/.copier-answers.shared.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# This file is @generated by <https://github.com/liblaf/copier-shared>.
22
# DO NOT EDIT!
3-
_commit: v0.2.9
3+
_commit: v0.2.12
44
_src_path: gh:liblaf/copier-share
55
author_email: 30631553+liblaf@users.noreply.github.com
66
author_name: liblaf

.config/mise/conf.d/50-shared.toml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#:schema https://mise.jdx.dev/schema/mise.json
2+
# This file is @generated by <https://github.com/liblaf/copier-shared>.
3+
# DO NOT EDIT!
4+
5+
[tasks.copier-update]
6+
description = "Recopy all configured Copier templates from their answers files."
7+
file = "https://raw.githubusercontent.com/liblaf/copier-shared/229c877607592fdb64fd30c9fb5a511e86862304/mise-tasks/copier-update.sh"

.config/rumdl.toml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,7 @@
33

44
[global]
55
extend-enable = ["MD060"]
6-
extend-disable = ["MD001", "MD013", "MD024", "MD033", "MD036", "MD041"]
6+
extend-disable = ["MD001", "MD013", "MD033", "MD036", "MD041"]
7+
8+
[per-file-flavor]
9+
"docs/**/*.md" = "mkdocs"

.config/tombi.toml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
#:schema https://www.schemastore.org/tombi.json
2+
# ref: <https://tombi-toml.github.io/tombi/docs/configuration/>
3+
4+
[files]
5+
include = ["**/*.toml", "**/*.toml.jinja"]
6+
7+
[schema]
8+
strict = false

.github/workflows/release-draft.yaml

Lines changed: 0 additions & 61 deletions
This file was deleted.

.github/workflows/release-pr.yaml

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,10 @@ on:
99
- main
1010

1111
env:
12-
GIT_CLIFF_CONFIG_URL: https://raw.githubusercontent.com/liblaf/copier-release/refs/heads/main/cliff.toml
12+
GIT_CLIFF_CONFIG_URL: >-
13+
https://raw.githubusercontent.com/liblaf/copier-release/0c66649f89da259fdfdc5e34caf43a57d1ce5d46/cliff.toml
14+
15+
#
1316

1417
concurrency:
1518
group: ${{ github.workflow }} @ ${{ github.ref }}
@@ -32,12 +35,12 @@ jobs:
3235
with:
3336
fetch-depth: 0
3437
- name: Install git-cliff
35-
uses: taiki-e/install-action@7a562dfa955aa2e4d5b0fd6ebd57ff9715c07b0b # v2
38+
uses: taiki-e/install-action@cf525cb33f51aca27cd6fa02034117ab963ff9f1 # v2
3639
with:
3740
tool: git-cliff
3841
- id: version
3942
name: Next version
40-
uses: liblaf/actions/next-version@12ffbdf8f37ab1ff07565b44b643fd8433621cd7 # v1
43+
uses: liblaf/actions/next-version@30c85b7c83d5db558c3113c5a7297837f6fe4904 # v1
4144
env:
4245
GIT_CLIFF_CONFIG_URL: ${{ env.GIT_CLIFF_CONFIG_URL }}
4346
GITHUB_TOKEN: ${{ github.token }}
@@ -58,16 +61,16 @@ jobs:
5861
steps:
5962
- id: auth
6063
name: Auth
61-
uses: liblaf/actions/auth@12ffbdf8f37ab1ff07565b44b643fd8433621cd7 # v1
64+
uses: liblaf/actions/auth@d510a5eaa5206b30ed1009660d04ef8082daf2d9 # v2
6265
with:
63-
app-id: ${{ vars.APP_ID }}
64-
private-key: ${{ secrets.PRIVATE_KEY }}
66+
client-id: ${{ vars.APP_CLIENT_ID }}
67+
private-key: ${{ secrets.APP_PRIVATE_KEY }}
6568
- name: Checkout
6669
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
6770
with:
6871
fetch-depth: 0
6972
- name: Install git-cliff
70-
uses: taiki-e/install-action@7a562dfa955aa2e4d5b0fd6ebd57ff9715c07b0b # v2
73+
uses: taiki-e/install-action@cf525cb33f51aca27cd6fa02034117ab963ff9f1 # v2
7174
with:
7275
tool: git-cliff
7376
- name: Generate changelog
@@ -92,7 +95,7 @@ jobs:
9295
name: Bump package.json
9396
run: npm version '${{ needs.version.outputs.version }}' --no-git-tag-version
9497
- name: Create PR
95-
uses: peter-evans/create-pull-request@c0f553fe549906ede9cf27b5156039d195d2ece0 # v8
98+
uses: peter-evans/create-pull-request@5f6978faf089d4d20b00c7766989d076bb2fc7f1 # v8
9699
with:
97100
token: ${{ steps.auth.outputs.token }}
98101
commit-message: "chore(release): ${{ needs.version.outputs.tag }}"
@@ -105,3 +108,5 @@ jobs:
105108
automerge
106109
release-please
107110
assignees: ${{ github.repository_owner }}
111+
112+
#

.github/workflows/release-publish.yaml

Lines changed: 34 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,28 +4,51 @@
44
name: Release / Publish
55

66
on:
7-
schedule:
8-
- cron: "0 * * * *" # Runs every hour
9-
workflow_dispatch:
7+
pull_request:
8+
branches:
9+
- main
10+
types:
11+
- closed
1012

1113
jobs:
12-
release-publish:
13-
name: Publish Release
14+
release-draft:
15+
name: Create Release
1416
permissions:
1517
contents: write
18+
if: >-
19+
startsWith(github.head_ref, 'release-please/') &&
20+
github.event.pull_request.merged
1621
runs-on: ubuntu-latest
1722
environment:
1823
name: release-please
1924
deployment: false
2025
steps:
2126
- id: auth
2227
name: Auth
23-
uses: liblaf/actions/auth@1f83732587ff97f1babbe9218fdc5436dda1a16f # v1
28+
uses: liblaf/actions/auth@d510a5eaa5206b30ed1009660d04ef8082daf2d9 # v2
2429
with:
25-
app-id: ${{ vars.APP_ID }}
26-
private-key: ${{ secrets.PRIVATE_KEY }}
27-
- name: Publish drafts
28-
uses: liblaf/actions/publish-drafts@1f83732587ff97f1babbe9218fdc5436dda1a16f # v1
30+
client-id: ${{ vars.APP_CLIENT_ID }}
31+
private-key: ${{ secrets.APP_PRIVATE_KEY }}
32+
- name: Checkout
33+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
2934
with:
30-
older-than: 6hr
35+
token: ${{ steps.auth.outputs.token }}
36+
- id: version
37+
name: Get version
38+
run: |-
39+
tag="$(awk '{ print $NF }' <<< "$TITLE")"
40+
version="${tag#'v'}"
41+
echo "tag=$tag" >> "$GITHUB_OUTPUT"
42+
echo "version=$version" >> "$GITHUB_OUTPUT"
43+
env:
44+
TITLE: ${{ github.event.pull_request.title }}
45+
- name: Create tag
46+
run: |-
47+
git tag '${{ steps.version.outputs.tag }}'
48+
git push origin tag '${{ steps.version.outputs.tag }}'
49+
- name: Create release
50+
uses: softprops/action-gh-release@b4309332981a82ec1c5618f44dd2e27cc8bfbfda # v3
51+
with:
52+
body: ${{ github.event.pull_request.body }}
53+
tag_name: ${{ steps.version.outputs.tag }}
3154
token: ${{ steps.auth.outputs.token }}

.github/workflows/shared-approve.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,12 @@ jobs:
2121
steps:
2222
- id: auth
2323
name: Auth
24-
uses: liblaf/actions/auth@12ffbdf8f37ab1ff07565b44b643fd8433621cd7 # v1
24+
uses: liblaf/actions/auth@d510a5eaa5206b30ed1009660d04ef8082daf2d9 # v2
2525
with:
26-
app-id: ${{ vars.APP_ID }}
27-
private-key: ${{ secrets.PRIVATE_KEY }}
26+
client-id: ${{ vars.APP_CLIENT_ID }}
27+
private-key: ${{ secrets.APP_PRIVATE_KEY }}
2828
- name: Approve
29-
uses: liblaf/actions/approve@12ffbdf8f37ab1ff07565b44b643fd8433621cd7 # v1
29+
uses: liblaf/actions/approve@d510a5eaa5206b30ed1009660d04ef8082daf2d9 # v2
3030
with:
3131
approve-token: ${{ steps.auth.outputs.token }}
3232
label: ${{ matrix.label }}

.github/workflows/shared-copier-update.yaml

Lines changed: 13 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -25,36 +25,31 @@ jobs:
2525
steps:
2626
- id: auth
2727
name: Auth
28-
uses: liblaf/actions/auth@12ffbdf8f37ab1ff07565b44b643fd8433621cd7 # v1
28+
uses: liblaf/actions/auth@d510a5eaa5206b30ed1009660d04ef8082daf2d9 # v2
2929
with:
30-
app-id: ${{ vars.APP_ID }}
31-
private-key: ${{ secrets.PRIVATE_KEY }}
30+
client-id: ${{ vars.APP_CLIENT_ID }}
31+
private-key: ${{ secrets.APP_PRIVATE_KEY }}
3232
- name: Checkout
3333
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
34+
- name: Install mise
35+
uses: jdx/mise-action@1648a7812b9aeae629881980618f079932869151 # v4
36+
- name: Install Copier
37+
run: pipx install --pip-args cookiecutter copier
3438
- name: Copier update
35-
# Note: Using `copier recopy --force` instead of `copier update` because
36-
# recopy with --force ensures all template files are synchronized with
37-
# the latest version, avoiding merge conflicts that update might create.
38-
run: |-
39-
copier=(pipx run --pip-args cookiecutter copier)
40-
if [[ -d '.config/copier/' ]]; then
41-
find '.config/copier/' -iname '.copier-answers*' -type f -print0 |
42-
while IFS= read -r -d '' answers_file; do
43-
echo "::group::$answers_file"
44-
"${copier[@]}" recopy --skip-answered --trust --answers-file "$answers_file" --force
45-
echo '::endgroup::'
46-
done
47-
fi
39+
run: mise run copier-update --skip-answered --trust --force
4840
- name: Create PR
49-
uses: peter-evans/create-pull-request@c0f553fe549906ede9cf27b5156039d195d2ece0 # v8
41+
uses: peter-evans/create-pull-request@5f6978faf089d4d20b00c7766989d076bb2fc7f1 # v8
5042
with:
5143
token: ${{ steps.auth.outputs.token }}
5244
commit-message: "chore(copier): update from template"
5345
branch: copier-update/${{ github.ref_name }}
5446
delete-branch: true
5547
sign-commits: true
5648
title: "chore(copier): update from template"
57-
body: Automated changes by [${{ github.workflow }}](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}) Workflow
49+
body: >-
50+
Automated changes by [${{ github.workflow }}](${{ github.server_url
51+
}}/${{ github.repository }}/actions/runs/${{ github.run_id }})
52+
Workflow
5853
labels: |-
5954
automerge
6055
copier

0 commit comments

Comments
 (0)