Skip to content

feat: automatic releases, update notice and team SSO profile lookup - #7

Merged
Alexanderamiri merged 4 commits into
mainfrom
ci/auto-release
Oct 24, 2026
Merged

Alexanderamiri merged 4 commits into
mainfrom
ci/auto-release

Conversation

@Alexanderamiri

Copy link
Copy Markdown
Member

Why

  • Releases only happen on a manually pushed v* tag. The last was v0.2.0 in March, so brew install and go install …@latest still serve March's build, and Chris had to build javabin secret from source. main also has no CI.
  • javabin secret list fails on a laptop without AWS_PROFILE. The SDK falls through to EC2 instance metadata, and Chris got no EC2 IMDS role found … 169.254.169.254 … host is down.
  • javabin --version reports nothing. GoReleaser's ldflags pointed at a main.version that doesn't exist.

What changed

  • CI (ci.yml) on PRs and main: gofmt, vet, tests, the release-version rules, and a GoReleaser snapshot build.
  • Automatic releases (release.yml): every push to main with a feat, fix or perf commit (or a breaking change) is released.
    • scripts/next-version.sh computes the next semver from Conventional Commits since the last tag (tested in scripts/next-version_test.sh).
    • The job then tags and runs GoReleaser, publishing to GitHub Releases and javaBin/homebrew-tap, in the same job: tags pushed with GITHUB_TOKEN don't trigger workflows.
    • Pushes with only docs, ci or chore commits don't release. A manual v* tag still works.
    • Squash-merge PR titles therefore decide releases.
  • javabin --version, plus a notice at most once a day (stderr, TTY only) when a newer release exists: brew upgrade javabin. JAVABIN_NO_UPDATE_CHECK=1 disables it.
  • AWS profile for secret: --profile, else AWS_PROFILE, else the one ~/.aws/config SSO profile for account 553637109631 with role javabin-team-<team> (team from app.yaml). Without credentials it explains how to sign in. --profile also applies to status and whoami.

Merging this releases v0.3.0, which includes javabin secret (#6).

Checks

  • go vet and go test ./... pass, including new tests for version comparison, daily caching, quiet on dev/failure, and profile discovery (match, other account, ambiguous).
  • The next-version cases pass, and actionlint passes.
  • Built binary: --version prints javabin 0.2.0 (abc123), and a run with no credentials prints the sign-in help.

🤖 Generated with Claude Code

Alexanderamiri and others added 4 commits October 24, 2026 11:54
Releases only happened on manually pushed tags (last: v0.2.0 in March), so
brew and go install @latest never got new commands. CI now runs gofmt,
vet, tests and a GoReleaser snapshot on PRs and main, and every push to
main with feat/fix/perf commits is tagged with the next semver and
released to GitHub Releases and the Homebrew tap.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
javabin --version works (GoReleaser ldflags now target cmd.version; they
pointed at a main.version that didn't exist). Once a day the CLI checks
the latest release and suggests brew upgrade when outdated.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
… metadata

Without AWS_PROFILE the SDK fell through to EC2 instance metadata and
failed with a timeout. Team commands now use --profile, AWS_PROFILE, or
the one ~/.aws/config SSO profile for javabin-team-<team>, and explain
how to sign in when there are no credentials.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Review feedback on #7:
- A re-run after a failed publish reuses the tag already on HEAD instead
  of finding nothing to release; only main (or a v* tag) can release.
- A failed update check is recorded, so offline users don't wait for the
  timeout on every command; the TTY check uses x/term.
- An expired AWS_PROFILE session is named in the error instead of
  suggesting first-time SSO setup.
- go install builds report their module version; inline comments in
  ~/.aws/config no longer break profile lookup; more next-version cases.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@Alexanderamiri
Alexanderamiri merged commit a34faac into main Oct 24, 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