Skip to content

chore: publish mailtrap-local to NUR via goreleaser - #47

Open
leonid-shevtsov wants to merge 2 commits into
mainfrom
chore/goreleaser-mailtrap-nur
Open

chore: publish mailtrap-local to NUR via goreleaser#47
leonid-shevtsov wants to merge 2 commits into
mainfrom
chore/goreleaser-mailtrap-nur

Conversation

@leonid-shevtsov

@leonid-shevtsov leonid-shevtsov commented Jul 29, 2026

Copy link
Copy Markdown
Collaborator

What & why

Add a nix: publisher to goreleaser so each tag opens a PR in mailtrap/mailtrap-nur, keeping the Nix package in sync with releases the same way we already do for Homebrew.

  • Wire release workflow to install Nix (for nix-hash) and pass the renamed cross-repo secret GORELEASER_TOKEN.
  • Fail the release job if the expected Homebrew or NUR package PR is missing (goreleaser soft-fails those errors).
  • Add Nix install docs and release-pipeline notes to README so the new distribution channel is discoverable.

How to test

No QA needed — non-user-facing release-pipeline and docs changes only.

@coderabbitai

coderabbitai Bot commented Jul 29, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

The release workflow now installs Nix, uses GORELEASER_TOKEN for cross-repository publishing, and verifies the expected mailtrap-nur pull request. GoReleaser adds Nix package updates and installation output. The README documents Nix distribution and release destinations.

Changes

Release distribution

Layer / File(s) Summary
Release workflow setup
.github/workflows/release.yml
The release job targets the release environment, installs Nix, passes GORELEASER_TOKEN alongside GITHUB_TOKEN, and verifies the expected version-specific mailtrap-nur pull request.
GoReleaser publishing configuration
.goreleaser.yaml
Homebrew authentication uses GORELEASER_TOKEN. A Nix publisher updates mailtrap-nur, creates the mailtrap-sendmail symlink, and adds Nix installation output.
Distribution documentation
README.md
Documents Nix commands, the mailtrap-nur package, automated pull requests, and updated release repository locations.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Possibly related PRs

Sequence Diagram(s)

sequenceDiagram
  participant GitHubActions
  participant Nix
  participant GoReleaser
  participant mailtrapNur
  GitHubActions->>Nix: install Nix
  GitHubActions->>GoReleaser: run with GITHUB_TOKEN and GORELEASER_TOKEN
  GoReleaser->>mailtrapNur: open version-specific package update PR
  GitHubActions->>mailtrapNur: verify the expected PR
Loading

Suggested reviewers: sergeykorolev, mklocek, piobeny

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Title check ✅ Passed The title clearly identifies the main change: publishing mailtrap-local to NUR through GoReleaser.
Description check ✅ Passed The description explains the motivation, key changes, and testing approach, but it omits the template's Images and GIFs section.

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

Base automatically changed from docs/docker-hub-readme to main July 29, 2026 09:20
@leonid-shevtsov
leonid-shevtsov force-pushed the chore/goreleaser-mailtrap-nur branch from 6fa417d to 1d44829 Compare July 30, 2026 08:00

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In @.goreleaser.yaml:
- Around line 170-171: Update the GoReleaser configuration around the NUR
pull_request setting to add a post-release verification or alert that confirms
the expected mailtrap-nur pull request was created successfully. Ensure the
release flow detects and surfaces a missing NUR PR even when GoReleaser reports
the creation error non-fatally, without changing the existing release behavior
for successful PR creation.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 38186dae-7995-49d5-8464-66e7bfc0bff4

📥 Commits

Reviewing files that changed from the base of the PR and between 23653a6 and 1d44829.

📒 Files selected for processing (3)
  • .github/workflows/release.yml
  • .goreleaser.yaml
  • README.md

Comment thread .goreleaser.yaml
Co-authored-by: Cursor <cursoragent@cursor.com>
@leonid-shevtsov
leonid-shevtsov force-pushed the chore/goreleaser-mailtrap-nur branch from ac80426 to a9822dd Compare August 3, 2026 09:58

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In @.github/workflows/release.yml:
- Around line 85-87: Update the NUR PR lookup in the release workflow to accept
only valid OPEN or MERGED pull requests, rather than any result from --state
all. Ensure the jq selection evaluates matching PRs for the
mailtrap-local-${version} head and does not accept a closed or unrelated PR;
preserve the existing URL output for an accepted result.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 040035be-441b-46ac-a5cd-89df752a23c5

📥 Commits

Reviewing files that changed from the base of the PR and between 1d44829 and ac80426.

📒 Files selected for processing (1)
  • .github/workflows/release.yml

Comment thread .github/workflows/release.yml Outdated
Goreleaser package-manager pipes set ContinueOnError, so brew/nix PR errors
only log. Check both homebrew-local and mailtrap-nur for the expected head
branch after release.

Co-authored-by: Cursor <cursoragent@cursor.com>
@leonid-shevtsov
leonid-shevtsov force-pushed the chore/goreleaser-mailtrap-nur branch from a9822dd to 0de7a5d Compare August 3, 2026 10:01
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.

3 participants