Reference workflows for a changelog-based release flow in the agent skill #45

Merged
mikluko merged 1 commit from mikluko/release-flow-workflows into main 2026-11-19 18:51:04 +00:00
Owner

Summary

Four GitHub workflows an agent copies into a repository's .github/workflows/. The changelog decides a release, and the tag is what the release ends on, never what starts it, so GITHUB_TOKEN is the only token.

push to main
  plan       validate: is the newest entry a version no tag carries?
  draft      a draft release v<version>, pinned to the pushed commit     due only
  lint  ─┐
  test  ─┼─  in parallel, on every push and every pull request
  build ─┘   ko -> OCI layout -> artifact `image`; tags the checkout locally when releasing
  push       crane pushes that layout to ghcr.io as <version>            due only
  publish    the draft is published, which creates the tag               due only
skills/changelog/
├── SKILL.md                  # a pointer section, and a trigger in the description
└── references/
    ├── release-flow.md       # the flow, its failure paths, what to adapt
    └── workflows/            # release.yaml, build.yaml, lint.yaml, test.yaml
cmd/changelog/flow_test.go    # holds the four files to each other

Evidence

The set ran in a scratch repository, as it is here apart from comments:

Case What happened
A push that releases nothing draft, push and publish skipped; lint, test and build ran; no release, no tag.
A release from a merged pull request, 0.1.0 Mid-run: a draft pinned to the merge commit, and no tag. After: published, a lightweight tag on that commit, one image index for amd64 and arm64 under the digest ko printed, and a binary reporting v0.1.0 with vcs.modified=false.
A release whose test fails, then its fix, 0.2.0 The failed run left its draft, no tag and no image. The fix's run re-pinned that draft, and the tag is on the fix commit.
A workflow file changing on main mid-release, 0.3.0 Published on its pinned commit. The later push's run waited for it, then found nothing due.

go test ./... holds the four files together: each TestReleaseFlow* test fails when a called workflow, an input, the artifact name or fragments is changed in one file alone. CI's actionlint step reads them too.

Merge Danger

Door: two-way

Reference files and a test. Nothing the tool runs changes.

Blast Radius: docs

TestDocumentedInvocationsNameTheCurrentMajor now reads the two uses: lines in the reference workflows, so the next major moves them with the rest.

## Summary Four GitHub workflows an agent copies into a repository's `.github/workflows/`. The changelog decides a release, and the tag is what the release ends on, never what starts it, so `GITHUB_TOKEN` is the only token. ```text push to main plan validate: is the newest entry a version no tag carries? draft a draft release v<version>, pinned to the pushed commit due only lint ─┐ test ─┼─ in parallel, on every push and every pull request build ─┘ ko -> OCI layout -> artifact `image`; tags the checkout locally when releasing push crane pushes that layout to ghcr.io as <version> due only publish the draft is published, which creates the tag due only ``` ```text skills/changelog/ ├── SKILL.md # a pointer section, and a trigger in the description └── references/ ├── release-flow.md # the flow, its failure paths, what to adapt └── workflows/ # release.yaml, build.yaml, lint.yaml, test.yaml cmd/changelog/flow_test.go # holds the four files to each other ``` ## Evidence The set ran in a scratch repository, as it is here apart from comments: | Case | What happened | |---|---| | A push that releases nothing | `draft`, `push` and `publish` skipped; lint, test and build ran; no release, no tag. | | A release from a merged pull request, 0.1.0 | Mid-run: a draft pinned to the merge commit, and no tag. After: published, a lightweight tag on that commit, one image index for amd64 and arm64 under the digest ko printed, and a binary reporting `v0.1.0` with `vcs.modified=false`. | | A release whose test fails, then its fix, 0.2.0 | The failed run left its draft, no tag and no image. The fix's run re-pinned that draft, and the tag is on the fix commit. | | A workflow file changing on `main` mid-release, 0.3.0 | Published on its pinned commit. The later push's run waited for it, then found nothing due. | `go test ./...` holds the four files together: each `TestReleaseFlow*` test fails when a called workflow, an input, the artifact name or `fragments` is changed in one file alone. CI's actionlint step reads them too. ## Merge Danger **Door:** two-way Reference files and a test. Nothing the tool runs changes. **Blast Radius:** docs `TestDocumentedInvocationsNameTheCurrentMajor` now reads the two `uses:` lines in the reference workflows, so the next major moves them with the rest.
Reference workflows for a changelog-based release flow in the agent skill
All checks were successful
CI / test (pull_request) Successful in 27s
CI / lint (pull_request) Successful in 33s
cbc8d82fb0
The flow makes the tag the last thing a release produces rather than what
starts it: a push to main naming an untagged version opens a draft release
pinned to that commit, and publishing the draft creates the tag. A tag pushed
with the automatic token triggers no workflow, which is why a flow cut by a
tag needs a token of its own; here nothing waits on a tag and GITHUB_TOKEN is
enough.

They sit under the skill rather than under examples/ because they are a set
an agent copies into a repository, written for a Go module packaged with ko,
where examples/ holds generic policies executed against documents.

The set ran in a scratch repository through four cases: a push that releases
nothing, a release from a merged pull request, a failed release taken over by
its fix, and a release published while a workflow change landed on main.

Assisted-By: Claude <noreply@anthropic.com>
Sign in to join this conversation.
No description provided.