GitHub repository template with preconfigured code quality and release automation
A ready-to-use GitHub repository template with linting, git hooks, automated changelog, semantic versioning and automerged dependency updates. A new repository created from it configures itself (branches, labels, rules) with one workflow run and one command.
- Bun - Fast and modern package manager
- Husky - Automated Git hooks
- lint-staged - Incremental linting on staged files
- Markdownlint - Markdown file validation
- Yamllint - YAML file validation
- EditorConfig - Consistent coding styles across editors
- Gitmoji - Commits with emojis (
β¨ Add feature) - Commitlint - Validates commit messages (gitmoji or conventional)
- Changelog - Auto-generated from commits
- Semantic Release - Automated versioning and GitHub releases
- Renovate - Weekly dependency updates, automerged when CI passes
(shared preset
maxime-lenne/renovate-config) - GitHub vulnerability alerts - Read by Renovate to open security fixes
- GitHub CLI logged in (
gh auth login) and Bun - Renovate GitHub App installed on All repositories: every new repository is then covered automatically
- A personal access token of yours, exported as
RELEASE_TOKEN: the release workflow uses it to push theπ Releasecommit to the protectedmain(see Release Token)
# 1. Create the repository from the template (public: see "Private repositories")
gh repo create my-app --template WhiteWoodTech/github-repository-template --public --clone
cd my-app
# 2. Wait for the "Initialize repository" workflow, then fetch its commit
gh run watch
git pull
# 3. Install dependencies and git hooks
bun install
# 4. Apply GitHub settings (uses your gh session, admin rights)
# and store RELEASE_TOKEN as a repository secret
bun run setup:github| When | What |
|---|---|
First push (init.yml workflow) |
package.json name / version 0.0.0 / description, README title and links, empty CHANGELOG.md and docs/TASKS.md, main branch created next to develop, labels |
bun run setup:github |
Default branch develop, rebase-only merges, auto-merge, delete merged branches, vulnerability alerts on, Dependabot security updates off, branch protection on develop and main, labels, RELEASE_TOKEN secret |
| Renovate (app installed) | Dependency Dashboard issue, weekly update PRs, automerge of non-major updates when CI passes |
All GitHub settings come from .github/settings.yml.
Re-run bun run setup:github after changing it; --dry-run shows what would
change.
On GitHub Free, private repositories cannot use branch protection nor
auto-merge: setup:github reports them as warnings and applies everything
else. Renovate still automerges by merging PRs itself once checks pass.
- Rewrite
README.mdand thedocs/files for the project - Update
homepagein.github/settings.ymland.github/CODEOWNERS - Optionally delete
.github/workflows/init.yml(it no longer does anything)
# Interactive gitmoji commit
bun run commitAccepted formats:
- Gitmoji:
β¨ Add new feature - Conventional:
feat(scope): Add new feature
bun run lint # Lint all files
bun run lint:md # Lint Markdown only
bun run lint:md:fix # Auto-fix Markdown
bun run lint:yaml # Lint YAML filesbun run setup:github # Apply .github/settings.yml
bun run setup:github --dry-run # Preview changesReleases are automated via GitHub Actions when a PR is merged into main:
the version is computed from the commits since the last release, then
package.json, CHANGELOG.md, a π Release vX.Y.Z commit, the vX.Y.Z tag
and a GitHub Release (notes + CHANGELOG.md) are produced.
bun run release:dry # Preview the next version and notes locallyThe π Release commit is pushed to main, which is protected. On a personal
account, neither GITHUB_TOKEN nor the GitHub Actions app can bypass that
protection: only a repository admin can. The workflow therefore needs a
RELEASE_TOKEN secret holding a personal access token (PAT) of yours.
-
Create the PAT once, reused by all your repositories (GitHub β Settings β Developer settings β Personal access tokens):
- fine-grained token: resource owner = your account, All repositories, repository permissions Contents, Issues and Pull requests in read and write
- or a classic token with the
reposcope
-
Store it in the repository (on each new repository):
RELEASE_TOKEN=<pat> bun run setup:github --only=secrets # or: gh secret set RELEASE_TOKEN
Keep the PAT in your password manager or shell environment: with
RELEASE_TOKENexported, a plainbun run setup:githubstores it too. -
Renew it before it expires, then store it again with the same command.
Without RELEASE_TOKEN, the release job logs a warning and fails when pushing
the release commit to the protected main.
Rebase merges rewrite SHAs and the release adds a π Release commit to main,
so develop must be rebased onto main before the next develop β main PR.
The release workflow does it right after the release (bun run sync:develop,
force push with lease, allowed on develop for that purpose). Commits already
on main are dropped, develop then contains the release commit.
On your machine afterwards:
# develop never holds local commits: align it on the remote
git switch develop
git fetch origin
git reset --hard origin/develop
# branch in progress: replay it on the new develop
git switch feature/my-branch
git rebase origin/developIf the workflow reports a conflict (rare: develop changed the same lines as
the release commit), sync manually:
git switch develop && git fetch origin && git reset --hard origin/develop
bun run sync:develop # rebase develop onto main, push with leaseHooks are automatically configured via Husky:
- pre-commit: Runs lint-staged on modified files
- commit-msg: Validates commit message format
- post-checkout: Deletes local branches whose PR was merged (at most once
per hour;
bun run clean:branchesto run it manually)
Versions are determined automatically by commit gitmoji or conventional type:
| Gitmoji | Conventional | Version Bump |
|---|---|---|
| π₯ | type!:, BREAKING CHANGE: |
Major |
| β¨ π | feat |
Minor |
| π ποΈ π©Ή ποΈ β‘οΈ β»οΈ π β¬οΈ β¬οΈ | fix, perf, refactor |
Patch |
Details and release notes sections: docs/TECHNICAL_GUIDE.md.
| File | Description |
|---|---|
AGENTS.md |
AI agent guide and conventions (agents.md standard) |
docs/CONVENTIONS.md |
Code style and git conventions |
docs/TECHNICAL_GUIDE.md |
Technical implementation details |
docs/PROJECT_STRUCTURE.md |
Directory and file organization |
CONTRIBUTING.md |
Contribution guidelines |
CHANGELOG.md |
Version history |
| File | Purpose |
|---|---|
.github/settings.yml |
GitHub settings: branches, merge rules, labels, protection |
renovate.json |
Renovate config (extends the shared preset) |
.gitmoji.json |
Gitmoji-cli settings |
release.config.js |
Semantic-release config |
.markdownlint.json |
Markdown linting rules |
.yamllint.yml |
YAML linting rules |
.editorconfig |
Editor settings |
commitlint.config.js |
Commit message validation |
- GitHub rules (branches, reviews, required checks, labels): edit
.github/settings.yml, thenbun run setup:github - Dependency updates: shared rules live in
maxime-lenne/renovate-config; project-specific rules go inrenovate.json - Linting:
.markdownlint.json,.yamllint.yml,commitlint.config.js - Release:
release.config.js
MIT License - see the LICENSE file for details.
Maxime Lenne - maxime-lenne.fr
- GitHub: @maxime-lenne
- LinkedIn: maximelenne