Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
4bec90f
feat: add prepare release workflow
leoweyr Mar 20, 2026
20daca8
feat: add publish release workflow
leoweyr Mar 20, 2026
047bf99
feat: add user-facing workflows
leoweyr Mar 20, 2026
e48851c
chore: move reusable workflows to src
leoweyr Mar 20, 2026
4b667a0
feat: add change log config
leoweyr Mar 20, 2026
7e15921
docs: update readme with usage instructions
leoweyr Mar 20, 2026
04e730f
chore: add icon
leoweyr Mar 20, 2026
e81214e
docs(readme): add banner
leoweyr Mar 20, 2026
2ad0a73
chore: correct eye perspective in icon
leoweyr Mar 20, 2026
0b0676e
fix: move reusable workflows back to .github/workflows directory
leoweyr Mar 20, 2026
456d0c9
fix: add missing reusable release workflows
leoweyr Mar 20, 2026
8d2afaa
fix: rename reserved GITHUB_TOKEN secret in reusable workflows
leoweyr Mar 20, 2026
7aef3e8
fix: correct git-cliff config path to prevent fallback to default
leoweyr Mar 20, 2026
dd5ada5
fix: ensure revert commits follow conventional format in changelog
leoweyr Mar 22, 2026
b912f9e
release: v1.0.0
github-actions[bot] Mar 20, 2026
1eaef1a
fix: prioritize revert commits parsing to prevent misclassification a…
leoweyr Mar 22, 2026
167d2d0
fix: use type field to correctly classify revert commits in change log
leoweyr Mar 22, 2026
026c69b
fix: preserve original type/scope in revert commit preprocessing
leoweyr Mar 22, 2026
5f388b2
fix(cliff): classify build commits under DevOps
leoweyr Mar 28, 2026
1c00f3d
ci: add update used by repos stats workflow
leoweyr Mar 29, 2026
4c3e192
ci: stabilize reusable workflow dependency search
leoweyr Mar 29, 2026
86c093b
feat: add tracker for reusable workflow usage
leoweyr Mar 29, 2026
80556c5
fix: make release base branch configurable via reusable workflow input
leoweyr Mar 29, 2026
b637fd1
release: v1.0.1
github-actions[bot] Mar 29, 2026
a97f4d0
Merge branch 'master' into release/v1.0.1
leoweyr Mar 29, 2026
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
2 changes: 2 additions & 0 deletions .github/workflows/prepare-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,7 @@ permissions:
jobs:
call-prepare:
uses: leoweyr/github-release-workflow/.github/workflows/reusable-prepare-release.yml@develop
with:
base-branch: 'master'
secrets:
ACCESS_TOKEN: ${{ secrets.GITHUB_TOKEN }}
32 changes: 21 additions & 11 deletions .github/workflows/reusable-prepare-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@ on:
required: false
type: string
default: '20'
base-branch:
description: 'Base branch name for release pull requests.'
required: false
type: string
default: 'master'
commit-user-name:
description: 'Git user name for commit'
required: false
Expand All @@ -27,44 +32,49 @@ jobs:
prepare-release:
runs-on: ubuntu-latest
steps:
- name: Checkout Code
- name: 👣 Track Workflow Run
continue-on-error: true
run: |
curl -s "https://abacus.jasoncameron.dev/hit/leoweyr/github-release-workflow-usage" > /dev/null

- name: 📂 Checkout Code
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Checkout Config
- name: 🔄 Sync Changelog Config
uses: actions/checkout@v4
with:
repository: 'leoweyr/github-release-workflow'
path: .change-log-config
sparse-checkout: src/cliff.toml

- name: Setup Node.js
- name: 📦 Install Node.js
uses: actions/setup-node@v4
with:
node-version: ${{ inputs.node-verions }}

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

- name: Create Release Branch
- name: 🪾 Create Release Branch
run: |
git config --global user.name "${{ inputs.commit-user-name }}"
git config --global user.email "${{ inputs.commit-user-email }}"
git checkout -b release/${{ env.TAG_NAME }}

- name: Generate Changelog Content for PR Body
- name: 📝 Generate Changelog Content for PR Body
env:
GITHUB_REPO: ${{ github.repository }}
GITHUB_TOKEN: ${{ secrets.ACCESS_TOKEN }}
run: |
npx git-cliff --config .change-log-config/src/cliff.toml --verbose --latest --strip all > pr_body_raw.md

- name: Save PR Body to File
- name: 📂 Save PR Body to File
run: |
cat pr_body_raw.md | tail -n +2 > pr_body_cleaned.md

- name: Update CHANGELOG.md File
- name: 📝 Update Changelog File
env:
GITHUB_REPO: ${{ github.repository }}
GITHUB_TOKEN: ${{ secrets.ACCESS_TOKEN }}
Expand All @@ -77,18 +87,18 @@ jobs:
npx git-cliff --config .change-log-config/src/cliff.toml --verbose --output CHANGELOG.md
fi

- name: Commit and Push
- name: 🔄 Sync Commit and Push
run: |
git add CHANGELOG.md
git commit -m "release: ${{ env.TAG_NAME }}"
git push origin release/${{ env.TAG_NAME }}

- name: Create Pull Request
- name: 🚀 Deploy Pull Request
env:
GITHUB_TOKEN: ${{ secrets.ACCESS_TOKEN }}
run: |
gh pr create \
--title "release: ${{ env.TAG_NAME }}" \
--body-file pr_body_cleaned.md \
--base master \
--base ${{ inputs.base-branch }} \
--head release/${{ env.TAG_NAME }}
13 changes: 9 additions & 4 deletions .github/workflows/reusable-publish-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,17 @@ jobs:
runs-on: ubuntu-latest

steps:
- name: Checkout Code
- name: 👣 Track Workflow Run
continue-on-error: true
run: |
curl -s "https://abacus.jasoncameron.dev/hit/leoweyr/github-release-workflow-usage" > /dev/null

- name: 📂 Checkout Code
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Extract Tag Name
- name: 🔍 Verify Release Tag Name
id: extract_tag
run: |
TITLE="${{ github.event.pull_request.title }}"
Expand All @@ -26,12 +31,12 @@ jobs:
VERSION_TITLE=${TAG_NAME#v}
echo "VERSION_TITLE=$VERSION_TITLE" >> $GITHUB_ENV

- name: Create Release Body File
- name: 📝 Create Release Body File
env:
PR_BODY: ${{ github.event.pull_request.body }}
run: echo "$PR_BODY" > release_body.md

- name: Create GitHub Release
- name: 🚀 Deploy GitHub Release
env:
GH_TOKEN: ${{ secrets.ACCESS_TOKEN }}
run: |
Expand Down
60 changes: 60 additions & 0 deletions .github/workflows/update-used-by-repos-stats.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
name: Update Used by Repos Stats

on:
push:
schedule:
- cron: "47 9 * * *"
workflow_dispatch:

jobs:
update-dependents-stats:
runs-on: ubuntu-latest
steps:
- name: 🔍 Verify Dependent Repositories in GitHub Code
id: get-count
env:
GH_TOKEN: ${{ secrets.APP_GITHUB_TOKEN }}
run: |
set -euo pipefail
QUERIES=(
'leoweyr/github-release-workflow/.github/workflows/reusable-prepare-release.yml path:.github/workflows'
'leoweyr/github-release-workflow/.github/workflows/reusable-publish-release.yml path:.github/workflows'
)

ALL_REPOSITORIES=''

for QUERY in "${QUERIES[@]}"; do
echo "🔍 Searching for: $QUERY"
RESULTS=$(gh api --paginate -X GET search/code \
-F q="$QUERY" \
-F per_page=100 \
--jq '.items[].repository.full_name')

if [ -n "$RESULTS" ]; then
ALL_REPOSITORIES="$(printf '%s\n%s' "$ALL_REPOSITORIES" "$RESULTS")"
fi

sleep 2
done

ALL_REPOSITORIES=$(printf '%s\n' "$ALL_REPOSITORIES" | sed '/^$/d')

if [ -z "$ALL_REPOSITORIES" ]; then
COUNT=0
else
COUNT=$(printf '%s\n' "$ALL_REPOSITORIES" | sort -u | wc -l | tr -d ' ')
fi

echo "✅ Found $COUNT unique dependent repositories."

printf 'TOTAL_COUNT=%s\n' "$COUNT" >> "$GITHUB_ENV"

- name: 🔄 Sync Gist Badge Data
uses: schneegans/dynamic-badges-action@v1.7.0
with:
auth: ${{ secrets.APP_GITHUB_TOKEN }}
gistID: 0575adecfc13c95f281dfccfe5b76063
filename: github-release-workflow-used-by-stats.json
label: Used by
message: ${{ env.TOTAL_COUNT }} repos
color: "#CCA414"
23 changes: 23 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,29 @@

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

# [1.0.1](https://github.com/leoweyr/github-release-workflow/compare/v1.0.0...v1.0.1) (2026-03-29)
### Bug Fixes

* ensure revert commits follow conventional format in changelog ([dd5ada5](https://github.com/leoweyr/github-release-workflow/commit/dd5ada5e8272905e52de6406c80e15e7687b5a66)) [@leoweyr](https://github.com/leoweyr)
* prioritize revert commits parsing to prevent misclassification as fixes ([1eaef1a](https://github.com/leoweyr/github-release-workflow/commit/1eaef1a20d01fc9c1364450edf8835ec28a8cef5)) [@leoweyr](https://github.com/leoweyr)
* 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)
* preserve original type/scope in revert commit preprocessing ([026c69b](https://github.com/leoweyr/github-release-workflow/commit/026c69bca35934a55b410dfcb0967c04a45784b5)) [@leoweyr](https://github.com/leoweyr)
* **cliff:** classify build commits under DevOps ([5f388b2](https://github.com/leoweyr/github-release-workflow/commit/5f388b21e821991109aa423c44000d0c1636571f)) [@leoweyr](https://github.com/leoweyr)
* make release base branch configurable via reusable workflow input ([80556c5](https://github.com/leoweyr/github-release-workflow/commit/80556c58d324283358c651fee2049b8b030d62cd)) [@leoweyr](https://github.com/leoweyr)


### Features

* add tracker for reusable workflow usage ([86c093b](https://github.com/leoweyr/github-release-workflow/commit/86c093b0a8ea79899530578d3a86c452cd1cdb4c)) [@leoweyr](https://github.com/leoweyr)


### DevOps

* add update used by repos stats workflow ([1c00f3d](https://github.com/leoweyr/github-release-workflow/commit/1c00f3daa4c7858d75a591fe313472e561493709)) [@leoweyr](https://github.com/leoweyr)
* stabilize reusable workflow dependency search ([4c3e192](https://github.com/leoweyr/github-release-workflow/commit/4c3e1924b3628575dd60216fd88c1699834b193e)) [@leoweyr](https://github.com/leoweyr)



# [1.0.0] (2026-03-20)
### Bug Fixes

Expand Down
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
![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)

![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)
![Used by Stats](https://img.shields.io/endpoint?url=https://gist.githubusercontent.com/leoweyr/0575adecfc13c95f281dfccfe5b76063/raw/github-release-workflow-used-by-stats.json)

> [!IMPORTANT]
> To ensure changelogs are generated correctly, all git commit messages must follow the **[Conventional Commits](https://www.conventionalcommits.org/)** specification.
>
Expand Down
6 changes: 4 additions & 2 deletions src/cliff.toml
Original file line number Diff line number Diff line change
Expand Up @@ -58,15 +58,18 @@ conventional_commits = true
filter_unconventional = true
split_commits = false
commit_preprocessors = [
{ pattern = '^Revert "(.+)"$', replace = "revert $1" },
{ pattern = '^Revert "([a-z]+)(\((.+)\))?: (.+)"$', replace = "revert($1:$3): $4" },
{ pattern = '^Revert "([a-z]+): (.+)"$', replace = "revert($1): $2" },
]

commit_parsers = [
{ message = "^revert", group = "Revert" },
{ message = "^fix", group = "Bug Fixes" },
{ message = "^feat", group = "Features" },
{ message = "^perf", group = "Performance" },
{ message = "^refactor", group = "Refactor" },
{ message = "^test", group = "Testing" },
{ message = "^build", group = "DevOps" },
{ message = "^ci", group = "DevOps" },
{ message = "^doc", group = "Documentation" },
{ message = "^style", group = "Styling" },
Expand All @@ -76,7 +79,6 @@ commit_parsers = [
{ message = "^chore\\(pull\\)", skip = true },
{ message = "^chore", group = "Miscellaneous Tasks" },
{ body = ".*security", group = "Security" },
{ message = "^[Rr]evert", group = "Revert" },
]

protect_breaking_commits = false
Expand Down
Loading