Skip to content

Add deb/rpm/apk packages and Nix flake to releases#195

Merged
jeremy merged 6 commits intomainfrom
packaging
Mar 5, 2026
Merged

Add deb/rpm/apk packages and Nix flake to releases#195
jeremy merged 6 commits intomainfrom
packaging

Conversation

@jeremy
Copy link
Copy Markdown
Member

@jeremy jeremy commented Mar 5, 2026

Summary

Broadens the packaging ecosystem with native Linux packages and Nix support.

Linux packages (nfpm):

  • Adds nfpms stanza to .goreleaser.yaml — builds .deb, .rpm, .apk (amd64 + arm64) with shell completions
  • Zsh completions routed per-packager: vendor-completions (deb/apk), site-functions (rpm)
  • No dependencies, no pre/post scripts, no signing — binary + completions only

Nix flake:

  • flake.nix + nix/package.nixbuildGoModule derivation with Go 1.26, shell completions via installShellCompletion
  • nix profile install github:basecamp/basecamp-cli works now
  • scripts/update-nix-flake.sh automates version + vendorHash updates
  • make release bumps version and recomputes vendorHash via Docker when go.mod changes
  • CI verifies flake builds post-release (nix-verify job)

Docs: release header, README, install.md, RELEASING.md all updated with new install methods.

Verification

Linux packages (all passed)

Gate Result
goreleaser check Config valid
goreleaser release --snapshot --clean 6 packages built (3 formats × 2 arches)
Artifact inspection (deb/apk via ar/tar) Binary + 3 shell completions, correct zsh paths per packager
Debian bookworm-slim container install → basecamp --version → verify completions → clean remove
Fedora 41 container install → basecamp --version → verify completions → clean remove
Alpine 3.21 container install → basecamp --version → verify completions → clean remove

Nix flake (all passed)

Gate Result
nix build (via Docker nixos/nix) Builds successfully, store path created
Binary runs basecamp version 0.2.3
Shell completions bash, fish, zsh all installed in store path

Test plan

  • CI passes (existing tests unaffected)
  • Next release tag produces 6 package assets in GitHub Release
  • nix profile install github:basecamp/basecamp-cli works from the tag

Copilot AI review requested due to automatic review settings March 5, 2026 05:34
@github-actions github-actions bot added docs enhancement New feature or request labels Mar 5, 2026
Copy link
Copy Markdown

Copilot AI left a comment

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 adds native Linux package distribution (.deb, .rpm, .apk) to the GoReleaser configuration, enabling users on Debian/Ubuntu, Fedora/RHEL, and Alpine to install the Basecamp CLI using their native package managers. The packages include the binary and shell completions for bash, zsh, and fish.

Changes:

  • Adds nfpms stanza to .goreleaser.yaml to produce .deb, .rpm, and .apk packages for amd64/arm64, with packager-specific zsh completion paths (vendor-completions for deb/apk, site-functions for rpm)
  • Updates the release header template with Linux package and Windows/Scoop install instructions
  • Adds Linux package installation option to README.md, install.md, and RELEASING.md documentation

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.

File Description
.goreleaser.yaml Adds nfpms configuration for deb/rpm/apk packages with shell completions; adds Linux and Windows install sections to release header
README.md Adds Linux deb/rpm/apk install option to "Other installation methods"
install.md Inserts Linux package as Option C, re-letters subsequent options
RELEASING.md Documents deb/rpm/apk build step and adds distribution channel entry

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

Copilot AI review requested due to automatic review settings March 5, 2026 06:11
Copy link
Copy Markdown

Copilot AI left a comment

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 6 out of 7 changed files in this pull request and generated 4 comments.


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

@github-actions github-actions bot added the ci CI/CD workflows label Mar 5, 2026
@jeremy jeremy changed the title Add deb/rpm/apk Linux packages to releases Add deb/rpm/apk packages and Nix flake to releases Mar 5, 2026
jeremy added 4 commits March 4, 2026 22:45
Adds native .deb, .rpm, and .apk packages as GitHub Release assets so
Debian/Ubuntu, Fedora/RHEL, and Alpine users get a familiar install path.
Binary + shell completions (bash, zsh, fish) with per-packager zsh paths.
buildGoModule derivation with shell completions via installShellCompletion.
vendorHash placeholder — first `nix build` resolves it from the error output.
Computed vendorHash via nix build in Docker (nixos/nix).
Override buildGoModule with go_1_26 since nixpkgs default is 1.25.
release.sh updates nix/package.nix version and recomputes vendorHash
via Docker when go.mod changes. CI verifies the flake builds post-release.
Adds `make update-nix-hash` for manual vendorHash recomputation.
Copilot AI review requested due to automatic review settings March 5, 2026 06:46
Pins nixpkgs for reproducible builds. Adds comment noting version
is auto-updated by scripts/update-nix-flake.sh on release.
Copy link
Copy Markdown

Copilot AI left a comment

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 10 out of 12 changed files in this pull request and generated 3 comments.


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

- Remove duplicate nix build invocation in CI verify step
- Use version-agnostic grep pattern for build success detection
- Pin nixos/nix to digest for supply-chain integrity
@jeremy jeremy merged commit 97b5250 into main Mar 5, 2026
21 checks passed
@jeremy jeremy deleted the packaging branch March 5, 2026 07:40
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 521f04dac4

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci CI/CD workflows docs enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants