Skip to content

Commit f82d62a

Browse files
release: v1.0.1 (#3)
1 parent b3d6bd5 commit f82d62a

7 files changed

Lines changed: 122 additions & 17 deletions

File tree

.github/workflows/prepare-release.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,7 @@ permissions:
1212
jobs:
1313
call-prepare:
1414
uses: leoweyr/github-release-workflow/.github/workflows/reusable-prepare-release.yml@develop
15+
with:
16+
base-branch: 'master'
1517
secrets:
1618
ACCESS_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/reusable-prepare-release.yml

Lines changed: 21 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,11 @@ on:
88
required: false
99
type: string
1010
default: '20'
11+
base-branch:
12+
description: 'Base branch name for release pull requests.'
13+
required: false
14+
type: string
15+
default: 'master'
1116
commit-user-name:
1217
description: 'Git user name for commit'
1318
required: false
@@ -27,44 +32,49 @@ jobs:
2732
prepare-release:
2833
runs-on: ubuntu-latest
2934
steps:
30-
- name: Checkout Code
35+
- name: 👣 Track Workflow Run
36+
continue-on-error: true
37+
run: |
38+
curl -s "https://abacus.jasoncameron.dev/hit/leoweyr/github-release-workflow-usage" > /dev/null
39+
40+
- name: 📂 Checkout Code
3141
uses: actions/checkout@v4
3242
with:
3343
fetch-depth: 0
3444

35-
- name: Checkout Config
45+
- name: 🔄 Sync Changelog Config
3646
uses: actions/checkout@v4
3747
with:
3848
repository: 'leoweyr/github-release-workflow'
3949
path: .change-log-config
4050
sparse-checkout: src/cliff.toml
4151

42-
- name: Setup Node.js
52+
- name: 📦 Install Node.js
4353
uses: actions/setup-node@v4
4454
with:
4555
node-version: ${{ inputs.node-verions }}
4656

47-
- name: Set Environment Variables
57+
- name: 🛠️ Set Environment Variables
4858
run: echo "TAG_NAME=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV
4959

50-
- name: Create Release Branch
60+
- name: 🪾 Create Release Branch
5161
run: |
5262
git config --global user.name "${{ inputs.commit-user-name }}"
5363
git config --global user.email "${{ inputs.commit-user-email }}"
5464
git checkout -b release/${{ env.TAG_NAME }}
5565
56-
- name: Generate Changelog Content for PR Body
66+
- name: 📝 Generate Changelog Content for PR Body
5767
env:
5868
GITHUB_REPO: ${{ github.repository }}
5969
GITHUB_TOKEN: ${{ secrets.ACCESS_TOKEN }}
6070
run: |
6171
npx git-cliff --config .change-log-config/src/cliff.toml --verbose --latest --strip all > pr_body_raw.md
6272
63-
- name: Save PR Body to File
73+
- name: 📂 Save PR Body to File
6474
run: |
6575
cat pr_body_raw.md | tail -n +2 > pr_body_cleaned.md
6676
67-
- name: Update CHANGELOG.md File
77+
- name: 📝 Update Changelog File
6878
env:
6979
GITHUB_REPO: ${{ github.repository }}
7080
GITHUB_TOKEN: ${{ secrets.ACCESS_TOKEN }}
@@ -77,18 +87,18 @@ jobs:
7787
npx git-cliff --config .change-log-config/src/cliff.toml --verbose --output CHANGELOG.md
7888
fi
7989
80-
- name: Commit and Push
90+
- name: 🔄 Sync Commit and Push
8191
run: |
8292
git add CHANGELOG.md
8393
git commit -m "release: ${{ env.TAG_NAME }}"
8494
git push origin release/${{ env.TAG_NAME }}
8595
86-
- name: Create Pull Request
96+
- name: 🚀 Deploy Pull Request
8797
env:
8898
GITHUB_TOKEN: ${{ secrets.ACCESS_TOKEN }}
8999
run: |
90100
gh pr create \
91101
--title "release: ${{ env.TAG_NAME }}" \
92102
--body-file pr_body_cleaned.md \
93-
--base master \
103+
--base ${{ inputs.base-branch }} \
94104
--head release/${{ env.TAG_NAME }}

.github/workflows/reusable-publish-release.yml

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,17 @@ jobs:
1212
runs-on: ubuntu-latest
1313

1414
steps:
15-
- name: Checkout Code
15+
- name: 👣 Track Workflow Run
16+
continue-on-error: true
17+
run: |
18+
curl -s "https://abacus.jasoncameron.dev/hit/leoweyr/github-release-workflow-usage" > /dev/null
19+
20+
- name: 📂 Checkout Code
1621
uses: actions/checkout@v4
1722
with:
1823
fetch-depth: 0
1924

20-
- name: Extract Tag Name
25+
- name: 🔍 Verify Release Tag Name
2126
id: extract_tag
2227
run: |
2328
TITLE="${{ github.event.pull_request.title }}"
@@ -26,12 +31,12 @@ jobs:
2631
VERSION_TITLE=${TAG_NAME#v}
2732
echo "VERSION_TITLE=$VERSION_TITLE" >> $GITHUB_ENV
2833
29-
- name: Create Release Body File
34+
- name: 📝 Create Release Body File
3035
env:
3136
PR_BODY: ${{ github.event.pull_request.body }}
3237
run: echo "$PR_BODY" > release_body.md
3338

34-
- name: Create GitHub Release
39+
- name: 🚀 Deploy GitHub Release
3540
env:
3641
GH_TOKEN: ${{ secrets.ACCESS_TOKEN }}
3742
run: |
Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
name: Update Used by Repos Stats
2+
3+
on:
4+
push:
5+
schedule:
6+
- cron: "47 9 * * *"
7+
workflow_dispatch:
8+
9+
jobs:
10+
update-dependents-stats:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: 🔍 Verify Dependent Repositories in GitHub Code
14+
id: get-count
15+
env:
16+
GH_TOKEN: ${{ secrets.APP_GITHUB_TOKEN }}
17+
run: |
18+
set -euo pipefail
19+
QUERIES=(
20+
'leoweyr/github-release-workflow/.github/workflows/reusable-prepare-release.yml path:.github/workflows'
21+
'leoweyr/github-release-workflow/.github/workflows/reusable-publish-release.yml path:.github/workflows'
22+
)
23+
24+
ALL_REPOSITORIES=''
25+
26+
for QUERY in "${QUERIES[@]}"; do
27+
echo "🔍 Searching for: $QUERY"
28+
RESULTS=$(gh api --paginate -X GET search/code \
29+
-F q="$QUERY" \
30+
-F per_page=100 \
31+
--jq '.items[].repository.full_name')
32+
33+
if [ -n "$RESULTS" ]; then
34+
ALL_REPOSITORIES="$(printf '%s\n%s' "$ALL_REPOSITORIES" "$RESULTS")"
35+
fi
36+
37+
sleep 2
38+
done
39+
40+
ALL_REPOSITORIES=$(printf '%s\n' "$ALL_REPOSITORIES" | sed '/^$/d')
41+
42+
if [ -z "$ALL_REPOSITORIES" ]; then
43+
COUNT=0
44+
else
45+
COUNT=$(printf '%s\n' "$ALL_REPOSITORIES" | sort -u | wc -l | tr -d ' ')
46+
fi
47+
48+
echo "✅ Found $COUNT unique dependent repositories."
49+
50+
printf 'TOTAL_COUNT=%s\n' "$COUNT" >> "$GITHUB_ENV"
51+
52+
- name: 🔄 Sync Gist Badge Data
53+
uses: schneegans/dynamic-badges-action@v1.7.0
54+
with:
55+
auth: ${{ secrets.APP_GITHUB_TOKEN }}
56+
gistID: 0575adecfc13c95f281dfccfe5b76063
57+
filename: github-release-workflow-used-by-stats.json
58+
label: Used by
59+
message: ${{ env.TOTAL_COUNT }} repos
60+
color: "#CCA414"

CHANGELOG.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,29 @@
22

33
All notable changes to this project will be documented in this file.
44

5+
# [1.0.1](https://github.com/leoweyr/github-release-workflow/compare/v1.0.0...v1.0.1) (2026-03-29)
6+
### Bug Fixes
7+
8+
* ensure revert commits follow conventional format in changelog ([dd5ada5](https://github.com/leoweyr/github-release-workflow/commit/dd5ada5e8272905e52de6406c80e15e7687b5a66)) [@leoweyr](https://github.com/leoweyr)
9+
* prioritize revert commits parsing to prevent misclassification as fixes ([1eaef1a](https://github.com/leoweyr/github-release-workflow/commit/1eaef1a20d01fc9c1364450edf8835ec28a8cef5)) [@leoweyr](https://github.com/leoweyr)
10+
* use type field to correctly classify revert commits in change log ([167d2d0](https://github.com/leoweyr/github-release-workflow/commit/167d2d00feabc34b87df97d9813c5b1ab7a2d27e)) [@leoweyr](https://github.com/leoweyr)
11+
* preserve original type/scope in revert commit preprocessing ([026c69b](https://github.com/leoweyr/github-release-workflow/commit/026c69bca35934a55b410dfcb0967c04a45784b5)) [@leoweyr](https://github.com/leoweyr)
12+
* **cliff:** classify build commits under DevOps ([5f388b2](https://github.com/leoweyr/github-release-workflow/commit/5f388b21e821991109aa423c44000d0c1636571f)) [@leoweyr](https://github.com/leoweyr)
13+
* make release base branch configurable via reusable workflow input ([80556c5](https://github.com/leoweyr/github-release-workflow/commit/80556c58d324283358c651fee2049b8b030d62cd)) [@leoweyr](https://github.com/leoweyr)
14+
15+
16+
### Features
17+
18+
* add tracker for reusable workflow usage ([86c093b](https://github.com/leoweyr/github-release-workflow/commit/86c093b0a8ea79899530578d3a86c452cd1cdb4c)) [@leoweyr](https://github.com/leoweyr)
19+
20+
21+
### DevOps
22+
23+
* add update used by repos stats workflow ([1c00f3d](https://github.com/leoweyr/github-release-workflow/commit/1c00f3daa4c7858d75a591fe313472e561493709)) [@leoweyr](https://github.com/leoweyr)
24+
* stabilize reusable workflow dependency search ([4c3e192](https://github.com/leoweyr/github-release-workflow/commit/4c3e1924b3628575dd60216fd88c1699834b193e)) [@leoweyr](https://github.com/leoweyr)
25+
26+
27+
528
# [1.0.0] (2026-03-20)
629
### Bug Fixes
730

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
![github-release-workflow](https://socialify.git.ci/leoweyr/github-release-workflow/image?description=1&font=KoHo&forks=1&issues=1&logo=https%3A%2F%2Fraw.githubusercontent.com%2Fleoweyr%2Fgithub-release-workflow%2Frefs%2Fheads%2Fdevelop%2Fassets%2Ficon.svg&name=1&owner=1&pattern=Formal+Invitation&pulls=1&stargazers=1&theme=Light)
22

3+
![Usage](https://img.shields.io/badge/dynamic/json?url=https%3A%2F%2Fabacus.jasoncameron.dev%2Fget%2Fleoweyr%2Fgithub-release-workflow-usage&query=%24.value&label=Usage&color=blue&suffix=%20times)
4+
![Used by Stats](https://img.shields.io/endpoint?url=https://gist.githubusercontent.com/leoweyr/0575adecfc13c95f281dfccfe5b76063/raw/github-release-workflow-used-by-stats.json)
5+
36
> [!IMPORTANT]
47
> To ensure changelogs are generated correctly, all git commit messages must follow the **[Conventional Commits](https://www.conventionalcommits.org/)** specification.
58
>

src/cliff.toml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,15 +58,18 @@ conventional_commits = true
5858
filter_unconventional = true
5959
split_commits = false
6060
commit_preprocessors = [
61-
{ pattern = '^Revert "(.+)"$', replace = "revert $1" },
61+
{ pattern = '^Revert "([a-z]+)(\((.+)\))?: (.+)"$', replace = "revert($1:$3): $4" },
62+
{ pattern = '^Revert "([a-z]+): (.+)"$', replace = "revert($1): $2" },
6263
]
6364

6465
commit_parsers = [
66+
{ message = "^revert", group = "Revert" },
6567
{ message = "^fix", group = "Bug Fixes" },
6668
{ message = "^feat", group = "Features" },
6769
{ message = "^perf", group = "Performance" },
6870
{ message = "^refactor", group = "Refactor" },
6971
{ message = "^test", group = "Testing" },
72+
{ message = "^build", group = "DevOps" },
7073
{ message = "^ci", group = "DevOps" },
7174
{ message = "^doc", group = "Documentation" },
7275
{ message = "^style", group = "Styling" },
@@ -76,7 +79,6 @@ commit_parsers = [
7679
{ message = "^chore\\(pull\\)", skip = true },
7780
{ message = "^chore", group = "Miscellaneous Tasks" },
7881
{ body = ".*security", group = "Security" },
79-
{ message = "^[Rr]evert", group = "Revert" },
8082
]
8183

8284
protect_breaking_commits = false

0 commit comments

Comments
 (0)