Skip to content

One-click CLI releases, workflow lint, Dependabot auto-merge - #61

Merged
Hitesh-Sisara merged 1 commit into
mainfrom
ci/release-pipeline
Sep 26, 2026
Merged

Hitesh-Sisara merged 1 commit into
mainfrom
ci/release-pipeline

Conversation

@Hitesh-Sisara

Copy link
Copy Markdown
Contributor

Summary

Release CLI workflow (release-cli.yml). Actions → Release CLI → Run workflow → 0.3.0. It runs the Go tests, tags main as v0.3.0 and cli/v0.3.0, builds all six binaries with goreleaser, publishes the GitHub release with checksums.txt, then runs cli/install.sh against the new assets and asserts --version matches. Tagging and publishing happen in one run because a tag pushed with GITHUB_TOKEN never triggers another workflow. Pushing a v* tag by hand still works; the workflow adds the missing cli/ tag.

Why the cli/ tag. The Go module lives in cli/, so go install github.com/Tapetide-hq/agentdraft/cli@latest currently resolves to a pseudo-version of main and reports 0.1.0-dev. With cli/vX.Y.Z tags it resolves to the release, and version.go now falls back to the module version Go embeds, so that install path reports the real version. goreleaser ignores cli/* when picking the previous tag for the changelog.

Hardening. cli.yml is test-only. Every workflow declares permissions: contents: read and cancels superseded PR runs. lint-workflows.yml runs actionlint on workflow changes.

Dependabot (dependabot-auto-merge.yml). Patch and minor bumps are approved and squash-merged after every other check run on the commit succeeds. Majors are left for a human. It polls check runs itself because the CI workflows are path-filtered, and a required check that never starts would block a PR forever.

Repo settings applied directly (not in this diff): squash-only merges, auto-merge enabled, delete-branch-on-merge, and a ruleset on main that requires a pull request and blocks force-push and deletion.

Tested

  • actionlint passes on all eight workflows.
  • go vet, go test, go build pass in cli/; new version_test.go covers the build-info fallback.
  • The jq filters in the Dependabot wait step were checked against a sample with success, failure, skipped, and in-progress runs.
  • The release workflow itself can only be proven by running it; I will dispatch 0.3.0 after merge.

…st-privilege tokens

release-cli.yml cuts a release from the Actions tab: run tests, tag main as
vX.Y.Z and cli/vX.Y.Z in one run (a tag pushed with GITHUB_TOKEN never starts a
workflow, so tag-then-trigger would publish nothing), build with goreleaser,
publish, and smoke-test install.sh against the new assets. The cli/ tag is what
lets go install .../cli@latest resolve to a release instead of a pseudo-version
of main, and version.go now falls back to the embedded module version so that
path reports the real version too. goreleaser ignores cli/* when computing the
changelog.

cli.yml is test-only now. Every workflow declares contents: read and cancels
superseded PR runs. lint-workflows.yml runs actionlint on workflow changes.
dependabot-auto-merge.yml squash-merges patch/minor bumps after waiting for the
PR's other check runs (path-filtered workflows cannot be required checks
without blocking PRs that never start them); majors wait for a human.

Repo settings applied alongside: squash-only, auto-merge on, delete branch on
merge, and a ruleset on main requiring a pull request and blocking force-push
and deletion. CONTRIBUTING documents the flow.
@Hitesh-Sisara
Hitesh-Sisara merged commit bf5d7ff into main Sep 26, 2026
6 checks passed
@Hitesh-Sisara
Hitesh-Sisara deleted the ci/release-pipeline branch September 26, 2026 03:01
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