Skip to content

Automate CLI releases from main and add update notice - #17

Merged
madhavkhoslaa merged 3 commits into
mainfrom
feat/auto-release
Oct 16, 2026
Merged

madhavkhoslaa merged 3 commits into
mainfrom
feat/auto-release

Conversation

@madhavkhoslaa

Copy link
Copy Markdown
Contributor

Summary

This PR automates Vapour CLI releases from main and adds a non-blocking update notice.

Workflow changes

  • ci.yml now runs on pull requests only.
  • release.yml is now the single release workflow:
    • triggers on push to main (with docs-only paths-ignore), workflow_dispatch, and v* tag pushes;
    • runs a test job (gofmt check, go vet, go test) before release;
    • computes the next semver tag from latest vX.Y.Z (default base v0.1.0 when none exist);
    • bump rules:
      • commit subjects since last tag containing [major] select major;
      • else [minor] selects minor;
      • else patch;
      • manual dispatch input overrides automatic bump;
    • skips tag creation when HEAD already has a v* tag (idempotent reruns);
    • creates and pushes an annotated tag for branch/manual runs, then runs goreleaser in the same job;
    • on tag pushes, runs goreleaser without creating another tag.
  • Added non-fatal LLM sync step before goreleaser:
    • bash scripts/sync-llm.sh || echo 'llm sync skipped' when script exists;
    • otherwise llm sync skipped.

Version stamping

  • Verified .goreleaser.yaml already injects cmd.Version via:
    • -X github.com/vapour-computer/vapour-cli/cmd.Version={{.Version}}

Update notice

  • Added runtime update notice check (cmd/update_notice.go):
    • skipped in CI (CI set), for vapour update, and for --version;
    • opt-out: VAPOUR_NO_UPDATE_CHECK=1;
    • checks latest release with 2s timeout;
    • cache in user cache dir (vapour/update-check.json) and checks at most once per 24h;
    • never fails user command;
    • prints one stderr line when newer release exists:
      • vapour X.Y.Z is available (you have A.B.C). Run: vapour update.
  • Added tests with httptest (cmd/update_notice_test.go).

Docs in this repo

  • Updated README with release behavior and update-notice details.
  • Updated docs/llm/release.md and docs/llm/overview.md.

Related docs PR

  • vapour-dev-docs companion PR: updates CLI reference and prerequisites install/update guidance.

Validation

  • gofmt -w cmd/root.go cmd/update_notice.go cmd/update_notice_test.go
  • go vet ./...
  • go test ./...
  • actionlint

Drafted with opencode (openai/gpt-5.3-codex).

@madhavkhoslaa
madhavkhoslaa merged commit bace9ff into main Oct 16, 2026
1 check 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