Skip to content

✨ feat: add dual release workflow for CLI and server#46

Open
vaayne wants to merge 4 commits intomainfrom
feat/release-workflow
Open

✨ feat: add dual release workflow for CLI and server#46
vaayne wants to merge 4 commits intomainfrom
feat/release-workflow

Conversation

@vaayne
Copy link
Copy Markdown
Collaborator

@vaayne vaayne commented Jan 18, 2026

Summary

Add GoReleaser configuration for two separate builds:

recally (CLI)

  • Lightweight CLI tool for saving web articles as markdown
  • Source: ./cmd/recally
  • No frontend build dependencies
  • Docker: ghcr.io/recally-io/recally

recally-server (Server)

  • Full web application with frontend
  • Source: ./main.go
  • Pre-build hooks: sqlc, swagger, bun (frontend)
  • Docker: ghcr.io/recally-io/recally-server

Changes

  • Updated .goreleaser.yaml with dual build configuration
  • Created Dockerfile.cli for CLI Docker image
  • Updated Dockerfile.goreleaser for server binary rename

Release Artifacts

  • recally_v*_* - CLI archives (tar.gz/zip)
  • recally-server_v*_* - Server archives with migrations
  • Multi-arch Docker images (amd64, arm64) for both components

- Add recally CLI build (./cmd/recally) - lightweight, no frontend deps
- Add recally-server build (./main.go) - full app with frontend hooks
- Create Dockerfile.cli for CLI Docker image
- Update Dockerfile.goreleaser for server binary rename
- Separate archives and Docker images for each component

Docker images:
- ghcr.io/recally-io/recally (CLI)
- ghcr.io/recally-io/recally-server (Server)
- Fix duplicate release conflict: release.yml now only creates tag
- GoReleaser handles the full release (changelog, assets, Docker)
- Update deprecated actions (checkout@v3 → v4, set-output → GITHUB_OUTPUT)
- Remove archived actions/create-release@v1
- Rename goreleaser workflow to 'GoReleaser Build' to avoid confusion
- Fix Dockerfile healthcheck (remove shell syntax from distroless)
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: d29e09dce2

ℹ️ 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".

Comment on lines +72 to +76
- cmd: go install github.com/sqlc-dev/sqlc/cmd/sqlc@latest
- cmd: go install github.com/swaggo/swag/cmd/swag@latest
- cmd: go generate ./...
- cmd: sqlc generate
- cmd: swag init -g internal/port/httpserver/router.go -o docs/swagger
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Avoid target-specific hooks for sqlc/swag generation

The new per-build hooks.pre run for every target (linux/darwin/windows, amd64/arm64). In GoReleaser these hooks inherit the target GOOS/GOARCH, so go install github.com/sqlc-dev/sqlc/.../.../swag/... will produce target binaries (e.g., Windows) and the subsequent sqlc generate/swag init executes them on the Linux runner, which fails with an exec-format error. This will break releases whenever non-native targets are enabled. Consider moving generation back to the global before hook or explicitly clearing GOOS/GOARCH for these commands so they always run with host binaries.

Useful? React with 👍 / 👎.

- Merge Dockerfile.cli into Dockerfile.goreleaser with multi-stage targets
- Use --target=cli or --target=server to select build
- Remove separate Dockerfile.cli
- Add {{ .Major }}.{{ .Minor }} tag to CLI docker image template
- Add corresponding docker manifest for multi-arch support
- Aligns CLI versioning with server for consistency
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