Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
9 changes: 9 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ updates:
time: '00:00'
timezone: 'Asia/Calcutta'
open-pull-requests-limit: 10
commit-message:
prefix: build
include: scope
labels:
- GHA
- Dependencies
Expand All @@ -18,6 +21,9 @@ updates:
time: '00:00'
timezone: 'Asia/Calcutta'
open-pull-requests-limit: 10
commit-message:
prefix: build
include: scope
labels:
- NPM
- Dependencies
Expand All @@ -38,6 +44,9 @@ updates:
time: '00:00'
timezone: 'Asia/Calcutta'
open-pull-requests-limit: 10
commit-message:
prefix: build
include: scope
labels:
- Composer
- Dependencies
69 changes: 69 additions & 0 deletions .github/release-starter/config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
{
"$schema": "https://raw.githubusercontent.com/googleapis/release-please/main/schemas/config.json",
"packages": {
".": {
"release-type": "node",
"changelog-path": "CHANGELOG.md",
"include-v-in-tag": true,
"include-component-in-tag": false,
"changelog-sections": [
{
"type": "feat",
"section": "Added"
},
{
"type": "fix",
"section": "Fixed"
},
{
"type": "perf",
"section": "Changed"
},
{
"type": "revert",
"section": "Changed"
},
{
"type": "build",
"section": "Changed"
},
{
"type": "docs",
"section": "Documentation",
"hidden": true
},
{
"type": "style",
"section": "Styles",
"hidden": true
},
{
"type": "chore",
"section": "Miscellaneous",
"hidden": true
},
{
"type": "refactor",
"section": "Code Refactoring",
"hidden": true
},
{
"type": "test",
"section": "Tests",
"hidden": true
},
{
"type": "ci",
"section": "Continuous Integration",
"hidden": true
}
],
"extra-files": [
{
"type": "generic",
"path": "style.css"
}
]
}
}
}
3 changes: 3 additions & 0 deletions .github/release-starter/manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
".": "2.0.0"
}
4 changes: 2 additions & 2 deletions .github/workflows/auto-merge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
if: |
contains( github.event.workflow_run.head_commit.message, 'version-update:semver-minor' ) ||
contains( github.event.workflow_run.head_commit.message, 'version-update:semver-patch' )
run: gh pr merge "$PR_NUMBER" --auto --merge --delete-branch
run: gh pr merge "$PR_NUMBER" --auto --squash --delete-branch
env:
GH_REPO: ${{ github.repository }}
PR_NUMBER: ${{ github.event.workflow_run.pull_requests[0].number }}
Expand All @@ -53,7 +53,7 @@ jobs:
endsWith(github.event.workflow_run.head_commit.message, format('{0} {1}', 'rtBot', '<43742164+rtBot@users.noreply.github.com>')) &&
github.event.workflow_run.head_commit.author.name == 'rtBot' &&
github.event.workflow_run.head_commit.author.email == '43742164+rtBot@users.noreply.github.com'
run: gh pr merge "$PR_NUMBER" --auto --merge --delete-branch
run: gh pr merge "$PR_NUMBER" --auto --squash --delete-branch
env:
GH_REPO: ${{ github.repository }}
PR_NUMBER: ${{ github.event.workflow_run.pull_requests[0].number }}
Expand Down
31 changes: 31 additions & 0 deletions .github/workflows/pr-title.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: PR Title Validation

# Pull requests are squash-merged and the PR title becomes the commit on main. release-please
# reads those subjects to pick the next version and write CHANGELOG.md, so the title has to be a
# Conventional Commit: feat -> minor, fix -> patch, a "!" after the type -> major.
#
# Not a required status check: the release pull request is opened with GITHUB_TOKEN, which
# starts no workflow runs, so this check never reports on it.

on:
pull_request:
Comment thread
Copilot marked this conversation as resolved.
Resolved
types: [opened, synchronize, edited, reopened, ready_for_review]

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number }}
cancel-in-progress: true

permissions: {}

jobs:
run:
name: Validate PR title
if: github.event.pull_request.draft == false
runs-on: ubuntu-latest
permissions:
pull-requests: read
steps:
- name: Validate pull request title
uses: amannn/action-semantic-pull-request@48f256284bd46cdaab1048c3721360e808335d50 # v6.1.1
env:
GITHUB_TOKEN: ${{ github.token }}
42 changes: 42 additions & 0 deletions .github/workflows/release-starter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Release (starter)

# release-please reads the Conventional Commit subjects squash-merged to main and keeps one
# release pull request open that bumps the version and writes CHANGELOG.md. Merging that pull
# request tags vX.Y.Z on main and publishes the GitHub release with the changelog entry as notes.
#
# The release pull request is opened with GITHUB_TOKEN, so GitHub starts no workflow runs on it
# (no tests, no PR title check). That is why neither check is a required status check. Switching
# the token below to a GitHub App token would give the release pull request its CI runs.
#
# This file releases the starter itself, from the config and manifest in .github/release-starter/.
# Init cleanup removes all of them, so projects made from the starter don't inherit them.

on:
push:
branches:
- main
workflow_dispatch:

permissions:
contents: read

# Serialise runs so two merges in quick succession can't race on the release pull request.
concurrency:
group: release
cancel-in-progress: false

jobs:
release-please:
name: Release Please
runs-on: ubuntu-latest
permissions:
contents: write
issues: write
pull-requests: write
steps:
- name: Open or update the release pull request, or publish the release
uses: googleapis/release-please-action@45996ed1f6d02564a971a2fa1b5860e934307cf7 # v5.0.0
with:
token: ${{ github.token }}
config-file: .github/release-starter/config.json
manifest-file: .github/release-starter/manifest.json
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

All notable changes to this project are documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

<!-- In the starter, release-please writes each release below from the Conventional Commit pull request titles merged to main, so don't add entries under `## Unreleased` here. Projects made from the starter keep `## Unreleased` for `npm run release:changelog`. -->

## Unreleased

## 2.0.0 - 2026-10-01
Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ Run the relevant focused tests and lint commands in [Local development](docs/loc

- [ ] The relevant focused tests and lint commands pass.
- [ ] New/changed behavior is covered by tests.
- [ ] Commits follow [Conventional Commits](https://www.conventionalcommits.org/).
- [ ] Commits follow [Conventional Commits](https://www.conventionalcommits.org/), and so does the PR title: pull requests are squash-merged, and the title becomes the commit on `main`.

## License

Expand Down
5 changes: 5 additions & 0 deletions bin/scaffold.config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/**
* Scaffold config for theme-elementary, consumed by bin/init.js and handed to
* the shared init engine in @rtcamp/wp-tooling.

Check warning on line 3 in bin/scaffold.config.js

View workflow job for this annotation

GitHub Actions / ci / Lint JS / ESLint

Unexpected inline JSDoc tag. Did you mean to use {@rtCamp}, \@rtCamp, or `@rtcamp`?
*
* Search tokens are embedded verbatim; safe because the engine never
* search-replaces files under bin/.
Expand Down Expand Up @@ -166,6 +166,11 @@
'.github/prompts',
'.github/instructions',
'languages',
// The starter's own release workflow, config and manifest. Cleanup also runs
// on re-init and --clean, so both paths are named for the starter: a
// project's own release-please files never live there.
'.github/release-starter',
'.github/workflows/release-starter.yml',
],
},

Expand Down
2 changes: 1 addition & 1 deletion docs/initialization.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ npm run init -- --name="Acme Blog" --version=1.0.0 --yes --remove-examples
| Optional features | HMR updates `.env.local`; Tailwind adds its entry/config and declarations. |
| State | `.wp-scaffold.json` records identity and feature choices; do not hand-edit it. |
| Autoload | Setup regenerates Composer's autoloader. |
| Cleanup | Before the wrapper's final sync, the Copilot-specific `.github` files (`copilot-instructions.md`, `prompts/`, `instructions/`) and `languages` (including the starter POT file) are removed. Workflows, issue templates, the PR template, `dependabot.yml`, and `release.yml` stay untouched. |
| Cleanup | Before the wrapper's final sync, the Copilot-specific `.github` files (`copilot-instructions.md`, `prompts/`, `instructions/`) and `languages` (including the starter POT file) are removed, along with the starter's own release workflow, config and manifest (`.github/workflows/release-starter.yml`, `.github/release-starter/`). The other workflows, issue templates, the PR template, `dependabot.yml`, and `.github/release.yml` stay untouched. |
| AI instructions | After a successful change, the wrapper runs `sync-ai`; in a standalone project with the framework installed, it refreshes the generated framework PHP instructions. It does not restore the removed prompts or theme-specific rules. |
| Retained files | Theme source, `bin/`, Claude skills, documentation, and test infrastructure remain; files belonging to removed example sets do not. |

Expand Down
12 changes: 11 additions & 1 deletion docs/internal/maintenance.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ If an installation route or feature cannot be exercised, report the missing prer

### Cleanup checks

Check that the Copilot-specific `.github` files (`copilot-instructions.md`, `prompts/`, `instructions/`) and `languages` are removed, while workflows, issue templates, and the PR template stay untouched. Also confirm the init wrapper script is not removed by cleanup, and that `sync-ai` (see [initialization.md](../initialization.md#what-changes)) restores only generated framework instructions. Claude skills and documentation remain; Copilot prompts and theme-specific GitHub rules do not. Run POT generation separately to verify the language output can be recreated.
Check that the Copilot-specific `.github` files (`copilot-instructions.md`, `prompts/`, `instructions/`) and `languages` are removed, along with the starter's release workflow, config and manifest (`.github/workflows/release-starter.yml`, `.github/release-starter/`), while the other workflows, issue templates, and the PR template stay untouched. Also confirm the init wrapper script is not removed by cleanup, and that `sync-ai` (see [initialization.md](../initialization.md#what-changes)) restores only generated framework instructions. Claude skills and documentation remain; Copilot prompts and theme-specific GitHub rules do not. Run POT generation separately to verify the language output can be recreated.

Check references in retained documentation and AI instructions. Use upstream source links for optional examples or starter-only files that cleanup may remove. Do not silently change the cleanup contract as part of a documentation correction.

Expand Down Expand Up @@ -90,6 +90,16 @@ node /path/to/action-docusaurus-build/cli.mjs build \

Check the homepage, navigation order, root-guide links, anchors, and mobile layout. The builder fails on broken internal links and missing repository-file links. Also check external links and root Markdown, which are not fully covered by the site build. Update incoming links whenever a guide is moved or removed, and [record the results](#record-validation-results).

## Releasing the theme

Releases of the theme itself are cut by [release-please](https://github.com/googleapis/release-please) (`.github/workflows/release-starter.yml`), from the config and manifest in `.github/release-starter/`. Init cleanup removes the workflow and that folder, so projects made from the starter don't inherit them; projects release by hand with `npm run release:bump` and `npm run release:changelog`.

1. Pull requests are squash-merged, so each PR title becomes one Conventional Commit on `main`. release-please reads those subjects and keeps a release pull request open that bumps the version in `package.json`, `package-lock.json` and `style.css` (between the `x-release-please-start-version` and `x-release-please-end` lines), and writes the next `CHANGELOG.md` section.
2. The title's type decides the version: `fix:` is a patch, `feat:` a minor, and `feat!:` (or a `BREAKING CHANGE:` footer) a major. Anything that changes what init generates, renames a script or a file a project relies on, or raises a minimum version is a `feat!:`. `docs:`, `test:`, `ci:`, `chore:` and `refactor:` cut no release. Dependabot pull requests are prefixed `build` (see `.github/dependabot.yml`), which lists them under Changed and makes them releasable: `composer create-project` installs the latest tag, so a dependency fix only reaches new projects once it is released. Each merge only updates the open release pull request, so merge that when you want to release, for example after a batch of security updates.
3. When you want to release, run the [release validation](#release-validation) against the release pull request's branch, reword its entries if a title reads badly, then squash-merge it. release-please tags `vX.Y.Z` and publishes the GitHub release with that section as the notes.

The release pull request is opened with `GITHUB_TOKEN`, so GitHub starts no workflow runs on it, and the PR title check is not a required status check for that reason. A GitHub App token in the workflow would give the release pull request its own runs. Never push a `v*` tag or edit `.github/release-starter/manifest.json` by hand.

## Knowledge graph

The graph is optional and may be stale. Verify exact behavior from current source when documenting it. For a deliberate artifact refresh, run local `graphify update .` and `graphify cluster-only . --no-label --no-viz`, then review the graph/report diff separately. Do not overwrite the theme's committed graph with a merged cross-repository graph during routine documentation work.
Expand Down
2 changes: 2 additions & 0 deletions style.css
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@
* Theme Name: Elementary Theme
* Theme URI: https://rtcamp.com/
* Description: A modern starter theme for developing Full Site Editing (FSE) block-based WordPress themes with comprehensive developer tools and best practices.
* x-release-please-start-version
* Version: 2.0.0
* x-release-please-end
* Author: rtCamp
* Author URI: https://rtcamp.com/
* Tags: fse
Expand Down
Loading