Skip to content

ci: release with release-please and Conventional Commits - #17

Merged
maxsoldev merged 3 commits into
mainfrom
ci-release-please
Nov 21, 2026
Merged

maxsoldev merged 3 commits into
mainfrom
ci-release-please

Conversation

@maxsoldev

Copy link
Copy Markdown
Owner

Summary

Commits follow Conventional Commits, and release-please makes the release PR (ADR 31).

sequenceDiagram
    participant Dev
    participant CI as ci.yml
    participant RP as release.yml: release-please
    participant Pub as release.yml: build, attest, publish
    Dev->>CI: PR
    CI->>CI: commits job: check-commits.ts base..head
    Dev->>RP: merge to main
    RP->>RP: open or update release PR (version + CHANGELOG.md)
    Dev->>RP: merge release PR
    RP->>Pub: release_created, tag v<version>
    Pub->>Pub: pnpm check, tarball, SBOMs, provenance
    Pub->>Pub: plugin branch, files + install notes on the release
Loading
 .githooks/commit-msg                 # opt in: git config core.hooksPath .githooks
 .github/
   dependabot.yml                     # build(deps) / ci(deps) subjects
   workflows/
     ci.yml                           # + commits job (pull requests only)
     release.yml                      # + release-please job; build runs on its release or a hand-pushed tag
+release-please-config.json           # node, tags v<version>, bump-minor-pre-major
+.release-please-manifest.json        # 0.1.0
 scripts/
+  check-commits.ts                   # <base>..<head> | --file <path>
+  lib/commit-message.ts              # subject rules, no dependency
   workflows.test.ts                  # writers: release-please + publish jobs only
 docs/adr/0031-…                      # the decision; ADR 30 amended
 AGENTS.md                            # commit types

The last commit is empty with Release-As: 0.1.1: the five fixes since v0.1.0 predate the new style, so release-please would not count them. Merging this opens the 0.1.1 release PR; their notes get added to the release by hand.

Evidence

  • Before: node scripts/check-commits.ts v0.1.0..origin/main → 5 of 5 commit message(s) do not follow Conventional Commits, exit 1.
    After: node scripts/check-commits.ts origin/main..HEAD → 3 commit message(s) follow Conventional Commits.
  • scripts/lib/commit-message.test.ts: 15 cases (accepts feat(viewer): …, feat!: …, build(deps): …; rejects no type, bad scope, final period, > 72, no blank line, empty).
  • scripts/workflows.test.ts failed on the old release.yml (no release-please job writing), passes now.
  • pnpm check green on each commit; actionlint clean on all workflows.

Merge Danger

Door: two-way

Revert restores the tag-only release. A release already cut stays (tag, GitHub Release, plugin branch commit).

Blast Radius: releases

The release path is untested on GitHub until the first release PR merges. Failure modes are a release without files or install notes, or no build run; a hand-pushed tag still releases. CI does not run on the release PR (GITHUB_TOKEN starts no workflow); the release build runs pnpm check first. PRs with old-style commit subjects now fail the commits job.

release-please picks the next version and writes the changelog from
commit types, so every commit that reaches main must have one. A CI
job checks each commit of a pull request; a commit-msg hook in
.githooks catches a bad message before it is pushed, since pushed
commits are not rewritten.

The check is a small script, not commitlint: it needs only the
subject rules, and commitlint would add a tree of dependencies.
Dependabot commits get the build(deps) and ci(deps) prefixes.
release-please keeps one release PR open with the next version and
CHANGELOG.md, from the Conventional Commits on main. Merging it tags
v<version> and creates the GitHub Release; a person still decides
when to release.

It runs as the first job of release.yml, not in its own workflow: a
tag made with GITHUB_TOKEN starts no other workflow, and a PAT or a
GitHub App would be a secret to keep. So the build, attest and
publish jobs run in the same run when it reports a release. The
publish job now adds its files to that release; a tag pushed by
hand still creates one, as before. See ADR 31.
The five fixes merged since v0.1.0 predate Conventional Commits, so
release-please does not count them. This footer makes it propose
0.1.1 for them.

Release-As: 0.1.1
@maxsoldev
maxsoldev merged commit 0b5db06 into main Nov 21, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant