Skip to content

Conversation

leynos
Copy link
Owner

@leynos leynos commented Sep 1, 2025

Summary

  • add release workflow that cross-builds and packages binaries with GoReleaser
  • package cross-built binaries into archives and Linux deb/rpm packages while keeping standalone binaries

Testing

  • make fmt
  • make lint
  • make test

https://chatgpt.com/codex/tasks/task_e_68b4f9dee17483228592056078f9196b

Summary by Sourcery

Automate the release process by building wireframe for Linux, macOS, and FreeBSD and packaging the binaries into archives and system packages via GoReleaser.

New Features:

  • Automate cross-platform packaging of wireframe binaries into tar.gz, deb, and rpm artifacts

Build:

  • Add GoReleaser configuration for archives, Linux deb and rpm packages, and checksum generation

CI:

  • Add GitHub Actions workflow to cross-compile and package releases using cross and GoReleaser

Packages cross-built binaries into archives and Linux deb/rpm packages while retaining standalone binaries.
Copy link
Contributor

sourcery-ai bot commented Sep 1, 2025

Reviewer's Guide

Introduces a GitHub Actions release pipeline that cross-builds Rust binaries for multiple platforms, prepares distribution artifacts, and leverages GoReleaser to package them into tar.gz archives, deb/rpm packages, and generate checksums.

Flow diagram for cross-building and packaging process in release workflow

flowchart TD
    Start([Release Published]) --> Checkout[Checkout Source]
    Checkout --> SetupRust[Setup Rust]
    SetupRust --> InstallCross[Install cross]
    InstallCross --> BuildBinaries[Cross-build Rust binaries]
    BuildBinaries --> PrepareDist[Prepare dist folders]
    PrepareDist --> SetupGo[Setup Go]
    SetupGo --> GoReleaser[Run GoReleaser]
    GoReleaser --> Archives[Create tar.gz archives]
    GoReleaser --> Packages[Create deb/rpm packages]
    GoReleaser --> Checksums[Generate checksums]
    Archives --> End([Upload to GitHub Release])
    Packages --> End
    Checksums --> End
Loading

File-Level Changes

Change Details Files
Introduce GitHub Actions workflow for release builds
  • Trigger on published GitHub releases
  • Cross-compile Rust binaries for Linux, macOS, and FreeBSD
  • Copy compiled binaries into a structured dist directory
  • Install Go and run GoReleaser skipping the build step
.github/workflows/release.yml
Add GoReleaser configuration for packaging
  • Define project build targets and disable internal build
  • Configure tar.gz archives including LICENSE and README.md
  • Set up nfpm to produce deb and rpm packages with metadata
  • Configure checksum file naming for release artifacts
.goreleaser.yml

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

Copy link
Contributor

coderabbitai bot commented Sep 1, 2025

Warning

Rate limit exceeded

@leynos has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 6 minutes and 25 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

📥 Commits

Reviewing files that changed from the base of the PR and between 1233ddf and 76b12b0.

📒 Files selected for processing (2)
  • .github/workflows/release.yml (1 hunks)
  • .goreleaser.yml (1 hunks)
✨ Finishing Touches
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch codex/extend-release-process-to-use-goreleaser

🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

CodeRabbit Commands (Invoked using PR/Issue comments)

Type @coderabbitai help to get the list of available commands.

Other keywords and placeholders

  • Add @coderabbitai ignore or @coderabbit ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Status, Documentation and Community

  • Visit our Status Page to check the current availability of CodeRabbit.
  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link
Contributor

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

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

Hey there - I've reviewed your changes and they look great!

Blocking issues:

  • An action sourced from a third-party repository on GitHub is not pinned to a full length commit SHA. Pinning an action to a full length commit SHA is currently the only way to use an action as an immutable release. Pinning to a particular SHA helps mitigate the risk of a bad actor adding a backdoor to the action's repository, as they would need to generate a SHA-1 collision for a valid Git object payload. (link)
Prompt for AI Agents
Please address the comments from this code review:
## Security Issues

### Issue 1
<location> `.github/workflows/release.yml:36` </location>

<issue_to_address>
**security (yaml.github-actions.security.third-party-action-not-pinned-to-commit-sha):** An action sourced from a third-party repository on GitHub is not pinned to a full length commit SHA. Pinning an action to a full length commit SHA is currently the only way to use an action as an immutable release. Pinning to a particular SHA helps mitigate the risk of a bad actor adding a backdoor to the action's repository, as they would need to generate a SHA-1 collision for a valid Git object payload.

*Source: opengrep*
</issue_to_address>

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

with:
go-version: '1.21'
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v5
Copy link
Contributor

Choose a reason for hiding this comment

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

security (yaml.github-actions.security.third-party-action-not-pinned-to-commit-sha): An action sourced from a third-party repository on GitHub is not pinned to a full length commit SHA. Pinning an action to a full length commit SHA is currently the only way to use an action as an immutable release. Pinning to a particular SHA helps mitigate the risk of a bad actor adding a backdoor to the action's repository, as they would need to generate a SHA-1 collision for a valid Git object payload.

Source: opengrep

with:
go-version: '1.21'
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v5

Check warning

Code scanning / CodeQL

Unpinned tag for a non-immutable Action in workflow Medium

Unpinned 3rd party Action 'Release' step
Uses Step
uses 'goreleaser/goreleaser-action' with ref 'v5', not a pinned commit hash
Copy link

@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 suggestions.

Reply with @codex fix comments to fix any unresolved comments.

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, or 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 fix this CI failure" or "@codex address that feedback".

Comment on lines +35 to +39
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v5
with:
distribution: goreleaser
version: v1.24.0

Choose a reason for hiding this comment

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

[P1] Remove --clean when packaging prebuilt binaries

The workflow compiles and copies the release binaries into dist/… and then runs GoReleaser with args: release --clean --skip=build. The --clean flag deletes the entire dist directory before GoReleaser begins, but --skip=build tells GoReleaser not to rebuild the binaries. On a published release this step will consistently fail because no binaries are left for GoReleaser to archive or turn into packages (stat dist/wireframe_linux_amd64/wireframe: no such file or directory). Drop --clean or stop skipping the build so the packaging step has inputs.

Useful? React with 👍 / 👎.

Comment on lines +18 to +21
- name: Build binaries
run: |
cross build --target x86_64-unknown-linux-gnu --release
cross build --target x86_64-apple-darwin --release

Choose a reason for hiding this comment

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

[P1] Cross build step targets unsupported macOS toolchain

The job attempts to run cross build --target x86_64-apple-darwin. The cross project intentionally does not ship Docker images for Apple targets because the macOS SDK cannot be redistributed, so this command fails on ubuntu-latest runners before packaging ever runs. The release workflow will never complete successfully until the macOS build is removed or performed on a macOS runner with an appropriate toolchain.

Useful? React with 👍 / 👎.

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant