Versions come from the commit history. Nobody writes a version number or release notes by hand, and the repository has no changelog file: the notes of each release are in its GitHub release.
Use Conventional Commits: type(scope): summary.
| Type | Effect on the version (before 1.0.0) | In the release notes |
|---|---|---|
feat: |
minor (0.1.0 → 0.2.0) | Features |
fix:, perf:, revert: |
patch (0.1.0 → 0.1.1) | Fixes, Performance, Reverts |
feat!: or a BREAKING CHANGE: footer |
minor before 1.0.0, major after | Features, with a note |
docs:, test:, ci:, chore:, refactor:, style: |
none by themselves | hidden |
The repository is squash-merged, so what counts is the pull request title: it becomes the commit message on main. The Conventional PR title check (.github/workflows/pr-title.yml) rejects a title that is not in this form, and runs again when the title is edited. Commits inside a pull request can be written freely.
- Pull requests are squash-merged into
main. - On every push to
main, therelease-pleasejob (.github/workflows/release.yml) opens or updates one pull request titledchore(main): release X.Y.Z. It changes the version inpackage.json,package-lock.jsonand.release-please-manifest.json(the last released version), and its description lists the changes since the last release. - Merging that pull request creates the tag
vX.Y.Zand a GitHub release with the notes. - The
publishjob then builds the PWA from the tag and attachesriglam-practice-pwa-vX.Y.Z.zipto the release. The same merge tomainchanges.release-please-manifest.json, which is what starts the production deploy on Cloudflare (see DEPLOY.md). The artifact page is not attached: it holds the definitions in the clear.
The first release was 0.1.0 (initial-version in release-please-config.json; the manifest value 0.0.0 means that nothing is released yet). Below 1.0.0 a breaking change bumps the minor version, a feat: too, a fix: the patch; 1.0.0 itself was released deliberately, and from there a breaking change bumps the major version, a feat: the minor and a fix: the patch. To choose a version, put Release-As: X.Y.Z in a commit footer. Because the repository squash-merges with the pull request title as the message, the footer has to be typed into the extended description of the merge dialog; a pull request description does not reach main. The other way is "release-as": "X.Y.Z" for the package in release-please-config.json (release-please marks it deprecated): the open release pull request then becomes that version, and the key must be removed again right after the release, because it pins every later release (a unit test fails while it is there).
The release type is node, so the version lives in package.json (the app shows it) and the manifest; do not edit it by hand. There is no CHANGELOG.md (skip-changelog; release-please would write one if it existed, so do not add it). Tags are plain vX.Y.Z.
Because the release pull request is created by a workflow, GitHub does not start CI on it when the default token is used. Either merge it without checks (it only changes version numbers) or add the optional RELEASE_PLEASE_TOKEN secret (below).
- Settings → Actions → General → Workflow permissions: tick Allow GitHub Actions to create and approve pull requests. Without it the release pull request cannot be created.
- Settings → General → Pull Requests: allow squash merging only, with default to pull request title for the commit message.
- Settings → Branches (or Rulesets): protect
mainand require the checksLint, build, testandConventional PR title. - Optional: a fine-grained personal access token (contents and pull requests: write) saved as the secret
RELEASE_PLEASE_TOKEN, so CI runs on release pull requests. - Secrets for deploys: see DEPLOY.md.
Dependabot opens weekly pull requests for npm (dev dependencies grouped, title prefix chore(deps)) and for GitHub Actions (ci(deps)). Neither triggers a release by itself. @playwright/test is excluded because it is bumped by hand: a new release changes the browser the specs run in, and the pin has to support the operating system of CI's ubuntu-latest (docs/TESTING.md).
Publishing the artifact build to the live artifact is not a release of this repository; the artifact keeps its own version ids (see ARTIFACT-LOOP.md). To republish an older app version to the artifact, check out its tag and build it with the course data (npm run build:artifact).
The release notes are for whoever maintains the app. What a learner reads after an update is src/app/news.ts (the What's new page, which the app opens after Update and keeps in Settings under About, with the version and the update). A feat: or fix: pull request that changes what a learner sees or can do adds one entry at the top, in plain words; one that does not says What's new: none, <why> in its body. The What's new entry check (.github/workflows/whats-new.yml) asks for one or the other.