Skip to content

Add versioning system and automated release workflow#18

Merged
Behnam-RK merged 3 commits into
mainfrom
feat/release-automation
Jul 9, 2026
Merged

Add versioning system and automated release workflow#18
Behnam-RK merged 3 commits into
mainfrom
feat/release-automation

Conversation

@Behnam-RK

Copy link
Copy Markdown
Owner

Summary

  • Adds CHANGELOG.md (Keep a Changelog format) seeded with the current feature set under [Unreleased].
  • Adds a manually-dispatched .github/workflows/release.yml: resolves a version (explicit or bumped from the latest tag), rolls [Unreleased] into a dated changelog entry, commits + tags + pushes, cross-compiles all 5 CLI targets and the macOS GUI (both version-stamped from the same VERSION), and publishes a GitHub Release with the changelog excerpt, SHA256SUMS, and the zipped .app.
  • macos-gui/build-app.sh + Makefile: the GUI bundle's Info.plist version was previously hardcoded (0.1.0) and decoupled from the CLI's main.version; it's now stamped from the same VERSION build variable via PlistBuddy.
  • docs/releasing.md (new release runbook) linked from docs/readme.md, README.md, docs/development.md; README gets an "Install" section pointing at Releases with the unsigned-GUI Gatekeeper note.

Notes / caveats

  • The workflow's prepare job pushes a changelog commit + tag directly to main using the default GITHUB_TOKEN. If main has branch protection blocking direct pushes, that step will fail — either allow the Actions bot to bypass it, or switch to a PAT.
  • First release needs an explicit version input (e.g. 0.1.0), since there's no tag yet to bump from.
  • The macOS .app ships unsigned (no Apple Developer cert) — documented Gatekeeper right-click-Open workaround in both docs/releasing.md and the README.

Test plan

  • gofmt -l . / go vet ./... / go build ./... / go test ./... all clean (also ran via the pre-commit hook).
  • Both workflow YAML files parse (ci.yml unchanged, release.yml new) validated with a YAML parser.
  • Dry-ran the semver resolution logic in isolation: no-tag + explicit version, patch/minor bump from an existing tag, and rejection of a version that isn't strictly greater than the latest tag.
  • Dry-ran the CHANGELOG-rolling + release-notes-extraction script against the actual seeded CHANGELOG.md — confirmed the [Unreleased]/[X.Y.Z] split, refreshed compare links, and a clean (no stray blank lines) release-notes body.
  • Built the real macOS GUI locally with VERSION=v0.2.0 make gui-macos and confirmed Info.plist's CFBundleShortVersionString/CFBundleVersion both read 0.2.0.
  • Built the CLI locally with VERSION=v0.2.0 make build and confirmed ./dezhban version prints dezhban v0.2.0.
  • Not yet run: an actual end-to-end dispatch of the Release workflow on GitHub (first real run will be the acceptance test — dispatch with version: 0.1.0 and confirm the tag, Release, and all 7 assets).

https://claude.ai/code/session_01ATFUm46qQ81vu7Cd4tRpUs

Adds a CHANGELOG.md (Keep a Changelog) and a manually-dispatched GitHub
Actions release workflow that resolves a version, rolls the changelog,
tags and pushes, cross-compiles all 5 CLI targets plus the macOS GUI
(both version-stamped from the same source), and publishes a GitHub
Release with checksums. The GUI's Info.plist version was previously
hardcoded and decoupled from the CLI version; it's now stamped from the
same VERSION build variable.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01ATFUm46qQ81vu7Cd4tRpUs

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR introduces a first-class versioning/release process for the project: a Keep-a-Changelog CHANGELOG.md, a manually dispatched GitHub Actions release workflow that tags/builds/publishes artifacts, and documentation updates. It also aligns the macOS GUI bundle versioning with the CLI by stamping Info.plist from the shared build VERSION.

Changes:

  • Add CHANGELOG.md and a new release runbook (docs/releasing.md) and link them from existing docs/README.
  • Add .github/workflows/release.yml to automate version resolution, changelog roll-forward, tagging, cross-compilation, checksums, and GitHub Release publishing.
  • Stamp the macOS GUI Info.plist version from the same build VERSION used by the CLI.

Reviewed changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
README.md Adds an Install section and links to the release runbook.
Makefile Passes DEZHBAN_VERSION=$(VERSION) into the macOS GUI build script.
macos-gui/build-app.sh Stamps Info.plist version fields from DEZHBAN_VERSION.
docs/releasing.md New documented release procedure and workflow requirements.
docs/readme.md Adds a link to the new release documentation.
docs/development.md Links development docs to the separate release flow.
CHANGELOG.md Introduces changelog in Keep a Changelog format with seeded Unreleased notes.
.github/workflows/release.yml New manual release workflow to roll changelog, tag, build artifacts, and publish a GitHub Release.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread .github/workflows/release.yml
Comment thread macos-gui/build-app.sh
Comment thread docs/releasing.md
Address Copilot PR #18 review:
- release.yml: refuse dispatch from any ref but main and pin checkout to
  main, so git push origin HEAD:main can never fast-forward main to another
  branch.
- build-app.sh: only stamp Info.plist when DEZHBAN_VERSION is a strict
  X.Y.Z, leaving the checked-in value for git-describe/dev builds whose
  format CFBundle version fields reject.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GR9nX5znzGP3E4ENSovQo6
@Behnam-RK Behnam-RK requested a review from Copilot July 9, 2026 06:53
@Behnam-RK Behnam-RK added the run-ci Run CI on this PR (gates .github/workflows/ci.yml) label Jul 9, 2026

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 8 out of 8 changed files in this pull request and generated 2 comments.

Comment thread .github/workflows/release.yml
Comment thread .github/workflows/release.yml Outdated
Address Copilot review on PR #18:

- Validate the latest tag is strict X.Y.Z before the auto-bump cut/arithmetic,
  so a stray pre-release tag (e.g. v0.2.0-rc1) fails with a clear message asking
  for an explicit version input instead of erroring inside $((patch + 1)).
- Roll the CHANGELOG by replacing the [Unreleased] ref line in place and
  inserting the new version's release link above the existing version refs,
  instead of deleting all version refs and re-adding only two. Older release
  headings now keep their compare/release links across successive releases.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01UNTB8kqWzAXYrG51kbhmqi
@Behnam-RK Behnam-RK merged commit a202411 into main Jul 9, 2026
5 checks passed
@Behnam-RK Behnam-RK deleted the feat/release-automation branch July 9, 2026 10:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

run-ci Run CI on this PR (gates .github/workflows/ci.yml)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants