Skip to content

ci: release from a workflow, with notes from Conventional Commits - #21

Merged
kalaspuff merged 1 commit into
mainfrom
ci/release-workflow
Oct 17, 2026
Merged

kalaspuff merged 1 commit into
mainfrom
ci/release-workflow

Conversation

@fctl-sh

@fctl-sh fctl-sh Bot commented Oct 17, 2026 •

Copy link
Copy Markdown
Contributor

Releases now come from a button, and their notes write themselves from Conventional Commits.

Releasing

Actions → Release → Run workflow (or gh workflow run release.yml --ref main -f bump=auto):

  1. Version and notes: cargo xtask release picks the next version from the commits since the last tag. A breaking change bumps the minor version before 1.0 (the major one after), a feat the minor version, anything else the patch; bump overrides it. It writes the version into Cargo.toml and Cargo.lock, adds the notes to CHANGELOG.md, commits chore(release): vX.Y.Z, tags it and pushes both to main atomically.
  2. Build and publish: the existing build, now with the generated notes on the GitHub release (cargo xtask notes <tag>). It then starts CI on main, which redeploys app.fctl.sh.

dry_run only shows the version and notes, in the run summary. tag rebuilds an existing release tag, which must be on main. Tags pushed by hand no longer publish anything. Starting the workflow needs write access to Actions, which fctl session tokens don't have. Before this, any agent with contents: write could push a tag and publish.

Conventional Commits

  • With squash merges the pull request title becomes the commit. A new Commits workflow fails on a non-conventional title, using cargo xtask lint-commit. When the title is edited, only this workflow reruns. On pushes to main it only warns. It's separate from CI on purpose: an edit that reran CI would skip the code checks, and GitHub counts a skipped check as passing.
  • CHANGELOG.md is backfilled for 0.1.0–0.1.2 from their commits.

For agents

  • .claude/skills/commit/SKILL.md: types, scopes, breaking changes, the description, branches, and the flow. Agents open pull requests and a person merges them.
  • .claude/skills/release/SKILL.md: preview, release, what to check afterwards, and what to do when it fails. Only for those with release access.
  • AGENTS.md's Git section now points at both. ADR 0006 records the decision. docs/development.md describes the new release flow.

How I verified it

  • Unit tests cover parsing, linting, version bumps, notes rendering and changelog insertion.
  • cargo xtask notes v0.1.2 reproduces 0.1.2's commits.
  • cargo xtask release --dry-run on main proposes 0.1.3.
  • A real cargo xtask release in a scratch clone produced the right Cargo.toml, Cargo.lock, CHANGELOG.md, release commit and tag.
  • cargo xtask check passes.

Branch protection waits until the repositories are public (GitHub Free has no branch rules for private repositories). That gets its own issue.

@kalaspuff
kalaspuff merged commit 841c77c into main Oct 17, 2026
4 checks passed
@kalaspuff
kalaspuff deleted the ci/release-workflow branch October 17, 2026 23:38
kalaspuff pushed a commit to hyperstructure/design that referenced this pull request Oct 17, 2026
The same release structure as hyperstructure/fctl#21, for the design
package.

- **Release workflow.** Actions → Release → Run workflow (`bump`: auto,
patch, minor or major; `dry_run`). It checks and builds `main`, then
`scripts/release.mjs` picks the version from the Conventional Commits
since the last tag: a breaking change bumps the minor version before
1.0, a `feat` the minor, anything else the patch. It writes
`package.json`, `package-lock.json` and `CHANGELOG.md`, pushes the
`chore(release): vX.Y.Z` commit and tag atomically, and creates the
GitHub release with the notes.
- **Pull request titles** must be Conventional Commits, since they
become the squash-merged commits. A **Conventional Commits** CI job
checks them with `scripts/lint-commit.mjs`, and checks again on title
edits.
- **Shared rules.** `scripts/commits.mjs` holds the parsing, linting,
versioning and notes rules, the same as fctl's `xtask/src/release.rs`.
`npm test` covers them and runs in CI.
- **Agent guidance.** `.claude/skills/commit` and
`.claude/skills/release` are new; the release skill includes moving fctl
and fctl-site to the new tag. AGENTS.md links to both.
- **Changelog.** `CHANGELOG.md` is backfilled for 0.1.0–0.1.2.

Repository settings changed alongside: squash merges now use the pull
request title and description, as in fctl.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

https://claude.ai/code/session_01PQMz6M4XFEb1wkZKjtJgEK

Co-authored-by: fctl-sh[bot] <343971779+fctl-sh[bot]@users.noreply.github.com>
kalaspuff pushed a commit to hyperstructure/fctl-site that referenced this pull request Oct 17, 2026
fctl.sh now follows the same commit conventions as
hyperstructure/fctl#21 and hyperstructure/design#1.

- **Title check.** Pull request titles must be Conventional Commits,
because they become the squash-merged commits on `main`, which deploys
fctl.sh. A **Conventional Commits** CI job checks them with
`scripts/lint-commit.mjs`, and checks again on title edits without
rebuilding the site.
- **Shared rules.** `scripts/commits.mjs` is a copy of design's, with
the same tests. CI now runs them (`npm test`).
- **Agent guidance.** `.claude/skills/commit` covers titles, scopes, the
description and the flow. AGENTS.md says pull requests only, and a
person merges them. The one exception is fctl's CI pinning
`fctl-docs.ref`; fctl#21 changes those pin commits to `docs: pin
hyperstructure/fctl@…`.

fctl-site has no releases (it deploys from `main`), so there's no
release workflow. Squash merges now use the pull request title and
description.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

https://claude.ai/code/session_01PQMz6M4XFEb1wkZKjtJgEK

Co-authored-by: fctl-sh[bot] <343971779+fctl-sh[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant