Skip to content

Replace Makefile releases with GoReleaser Pro - #660

Open
davidnewhall wants to merge 18 commits into
mainfrom
ci/goreleaser-pro
Open

Replace Makefile releases with GoReleaser Pro#660
davidnewhall wants to merge 18 commits into
mainfrom
ci/goreleaser-pro

Conversation

@davidnewhall

Copy link
Copy Markdown
Collaborator

Summary

  • Replace the Makefile/fpm/gon/AUR-deploy/Docker-hook release path with GoReleaser Pro (same shape as xt): one build-and-release job.
  • Nightly (push to unstable) publishes Hub+GHCR golift/unpackerr:unstable and ghcr.io/unpackerr/unpackerr:unstable only — it does not move latest. Tags (v*) still publish latest+semver, GitHub Release, AUR source package, Homebrew formula, signed/notarized DMG, and packagecloud golift/pkgs.
  • Dockerfile is now a copy-binary Alpine image for dockers_v2 (linux/amd64, linux/arm64, linux/arm/v7). Org secret DOCKERHUB_PASSWORD (Hub access token, user golift) is already set.

Test plan

  • build-and-release on unstable succeeds and Hub golift/unpackerr:unstable updates (amd64/arm64/arm)
  • GHCR ghcr.io/unpackerr/unpackerr:unstable updates
  • Nightly does not retag Hub latest, does not open a GitHub Release, and does not push AUR/Homebrew
  • packagecloud golift/unstable gets the nightly debs/rpms
  • After merge, the next v* tag publishes Hub latest+semver, AUR unpackerr, and golift/homebrew-mugs Formula/unpackerr.rb

Made with Cursor

davidnewhall and others added 2 commits August 26, 2026 22:52
Nightly pushes to unstable publish Hub/GHCR :unstable without moving latest; tags still cut GitHub releases, AUR, brew, and signed packages.

Co-authored-by: Cursor <cursoragent@cursor.com>
The release job failed at docker/login-action with "Password required"
because secrets.DOCKERHUB_PASSWORD is empty in this repository. Map the
secret for step ifs, skip Hub login and Hub image publish when it is
blank, and keep GHCR plus the rest of GoReleaser running.

Co-authored-by: Andreas Echavez <oceanplexian@users.noreply.github.com>

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

Stale comment

CI failure: build-and-release / release on unstable (same SHA as this PR head) failed at Log into Docker Hub.

docker/login-action@v4
username: golift
##[error]Password required

Job: https://github.com/Unpackerr/unpackerr/actions/runs/33043925078

Why: password: ${{ secrets.DOCKERHUB_PASSWORD }} is empty in this public repository. GitHub omits the input, and docker/login-action aborts before contacting Hub. GHCR login with GITHUB_TOKEN succeeded. This repo did not previously need a Hub token (Docker Hub autobuild hooks handled Hub); the org secret is either unset here or not granted to public repos (Notifiarr uses the same name in a different org).

Fix: 12ed604

  • Map DOCKERHUB_PASSWORD to job env so steps.if can see it.
  • Skip Hub login when empty; set DOCKERHUB_PUBLISH=1 only when it is present.
  • Split GHCR vs Hub in dockers_v2 and disable Hub configs unless that flag is set.

GHCR and the rest of GoReleaser can proceed without Hub credentials. Hub :unstable / :latest stay stale until DOCKERHUB_PASSWORD is granted to this public repo (Hub access token, user golift).

build-and-release only runs on unstable and v* tags. Fast-forward unstable to this commit to re-run the nightly job.

Open in Web View Automation 

Sent by Cursor Automation: CI Failure Auto-Fixer

Comment thread .github/workflows/release.yml
Comment thread .goreleaser.yaml Outdated
davidnewhall and others added 3 commits August 26, 2026 23:11
GoReleaser --nightly now means "not a GitHub release." A daily cron (and manual dispatch on main) publishes Hub/GHCR :nightly from main; pushing the unstable branch still publishes :unstable only.

Co-authored-by: Cursor <cursoragent@cursor.com>
v2.18 expects glob/name_template on dmg extra_files, not archive-style src/dst.

Co-authored-by: Cursor <cursoragent@cursor.com>
The unpackerr-darwin target used CGO_ENABLED=0, so GitHub's Linux
release job omitted energye/systray's Objective-C Cocoa backend and
failed with undefined nativeLoop/setInternalLoop/quit while compiling
darwin/amd64. Restore CGO_ENABLED=1 (same as the old Makefile) and
install osxcross from goreleaser-cross so ubuntu-latest can compile it.

Co-authored-by: Andreas Echavez <oceanplexian@users.noreply.github.com>

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

Stale comment

CI failure: release (Darwin systray CGO)

What failed: GoReleaser died while compiling darwin_amd64_v1 with # github.com/energye/systray undefined symbols (setInternalLoop, nativeLoop, setOnClick, nativeStart, registerSystray, quit, …). Linux, FreeBSD, and Windows binaries had already built.

Why: unpackerr-darwin in .goreleaser.yaml was CGO_ENABLED=0. The Darwin backend of github.com/energye/systray is Objective-C/Cocoa, so those native functions are not compiled without CGO. The old Makefile used CGO_ENABLED=1 on macos-latest; this Pro rewrite builds Darwin on ubuntu-latest (quill signing) but left CGO off.

Fix: 5e1a83f

  • Set CGO_ENABLED=1 for unpackerr-darwin (same as the Makefile) and point CC/CXX at osxcross when OSX_CROSS is set.
  • Copy /usr/local/osxcross from ghcr.io/goreleaser/goreleaser-cross:v1.27.0-1 in the Linux release job so o64-clang / oa64-clang can link Cocoa.

The release workflow still only runs on unstable and v* tags. Confirm Darwin on the next push to unstable (or a tag), not on this PR's test-and-lint jobs.

View PR

Open in Web View Automation 

Sent by Cursor Automation: CI Failure Auto-Fixer

Go 1.27 emits macOS 13 objects, so 10.8 only produced ld warnings. Repo-scoped Hub tokens cannot pull docker/buildkit-syft-scanner, which dockers_v2 SBOM attestations require.

Co-authored-by: Cursor <cursoragent@cursor.com>
@golift-bot
golift-bot requested review from oceanplexian and a balanced review from Copilot August 27, 2026 07:56
Cask service: is Automator, not brew services, and casks have no etc helper. Flatten archives so the cask finds the binary, install a LaunchAgent in postflight, and restore Docker SBOM now that the Hub token can pull the scanner.

Co-authored-by: Cursor <cursoragent@cursor.com>

Copilot AI 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.

Pull request overview

Migrates release automation from Make/FPM/Gon scripts to a unified GoReleaser Pro workflow.

Changes:

  • Adds cross-platform builds, packages, containers, Homebrew, AUR, signing, and notarization configuration.
  • Consolidates tagged, unstable, and nightly releases into one workflow.
  • Removes legacy release scripts and templates.

Reviewed changes

Copilot reviewed 20 out of 21 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
.goreleaser.yaml Defines the unified release pipeline.
.github/workflows/release.yml Runs channel-specific GoReleaser releases.
.github/scripts/unstable_upload.sh Uploads unstable artifacts and metadata.
.gitignore Ignores GoReleaser output.
init/docker/Dockerfile Creates copy-binary Alpine images.
init/docker/makedocker.sh Removes legacy Docker builder.
init/docker/hooks/build Removes Docker Hub build hook.
init/docker/hooks/pre_build Removes QEMU setup hook.
init/docker/hooks/push Removes obsolete push hook.
init/windows/signexe.sh Supports temporary GoReleaser signing CLI.
init/macos/Info.plist.tmpl Adds templated app metadata.
init/macos/makedmg.sh Removes legacy DMG creation.
init/macos/notarize.sh Removes legacy notarization flow.
init/macos/notarize.json Removes Gon notarization configuration.
init/macos/sign.json Removes Gon signing configuration.
init/archlinux/PKGBUILD.template Removes legacy AUR template.
init/archlinux/SRCINFO.template Removes legacy AUR metadata template.
init/archlinux/aur-deploy.sh Removes custom AUR deployment.
init/archlinux/README.md Removes obsolete template documentation.
Makefile Removes legacy build and release targets.
settings.sh Removes Make-based release metadata.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread .goreleaser.yaml
Comment on lines +141 to +142
ids:
- unpackerr-darwin
Comment thread init/macos/Info.plist.tmpl Outdated
Comment thread .goreleaser.yaml
Comment on lines +199 to +202
- id: freebsd
ids: [unpackerr-freebsd]
formats: [tar.xz]
wrap_in_directory: false
Comment thread .goreleaser.yaml Outdated
Comment thread .github/workflows/release.yml Outdated
if: env.CHANNEL == 'unstable'
env:
UNSTABLE_UPLOAD_KEY: ${{ secrets.UNSTABLE_UPLOAD_KEY }}
VERSION: ${{ github.ref_name }}
Comment thread .goreleaser.yaml
… versions.

nFPM maps both GOARM 6 and 7 to Debian armhf, so golift/upload-packagecloud
rejected the second file with "filename has already been taken". Skip GOARM=7
nfpms (keep GOARM=6, matching the old Makefile) and include REVISION in the
nightly version so later unstable pushes are not the same Debian filename.

Co-authored-by: Andreas Echavez <oceanplexian@users.noreply.github.com>

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

Stale comment

CI failure: release (packagecloud duplicate armhf)

What failed: build-and-release on unstable (SHA 12e53ee) died at golift/upload-packagecloud after goreleaser succeeded:

Pushing dist//unpackerr_0.15.3-unstable_linux_armv7.deb... error:
	filename: 'unpackerr_0.15.3~unstable+git_armhf.deb' has already been taken

386, amd64, arm64, and armv6 debs uploaded; armv7 did not.

Why: nFPM maps both GOARM 6 and 7 to Debian armhf. On-disk names differ (linux_armv6.deb vs linux_armv7.deb), but packagecloud keys on the control filename. The old Makefile built one armhf package from GOARM=6. Nightly versions were also 0.15.3-unstable plus +git with no iteration, so the next unstable push would collide even after dropping the extra armhf.

Fix: 1989e40

  • Skip GOARM=7 in nfpms (if); keep GOARM=6 as the armhf package. Archives and linux/arm/v7 Docker images still build both.
  • Append .{{ .Env.REVISION }} to nightly.version_template (the workflow already sets REVISION from git rev-list --count).

build-and-release only runs on unstable and v* tags. Fast-forward unstable to this commit to re-run the job.

Open in Web View Automation 

Sent by Cursor Automation: CI Failure Auto-Fixer

Comment thread .goreleaser.yaml Outdated
davidnewhall and others added 2 commits August 27, 2026 01:16
Keep one armhf for Packagecloud (GOARM=7, matching Docker) instead of skipping v7. Use nFPM release as the old fpm iteration so every upload has a unique Debian/RPM filename.

Co-authored-by: Cursor <cursoragent@cursor.com>
GoReleaser passes nfpms.release through to nFPM without applying Go
templates, so '{{ with .Env.REVISION }}...' was written into the Debian
Version and PackageCloud rejected the .deb as unreadable. Put REVISION
on nightly.version_template instead, which is templated, and keep a
single linux GOARM=7 armhf package.

Co-authored-by: Andreas Echavez <oceanplexian@users.noreply.github.com>

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

The release job failed at golift/upload-packagecloud while pushing dist/unpackerr_0.15.3-unstable_linux_386.deb:

repository: Debian package parsing error. We weren't able to read your Deb package.

Cause: 09efe7d moved uniqueness onto nfpms.release with a Go template ({{ with .Env.REVISION }}...). GoReleaser does not template that field (it is passed through to nFPM as-is), so the Debian Version became 0.15.3~unstable+git-{{ with .Env.REVISION }}{{ . }}{{ else }}0{{ end }}. {, }, and spaces are invalid in a Debian version, and PackageCloud refused the package.

Fix: 2d5c858 drops the untemplated nfpms.release and puts REVISION back on nightly.version_template (which GoReleaser does template), producing a unique, valid version such as 0.15.3~unstable.1028+git. Linux stays GOARM=7 only so there is still a single armhf package.

Open in Web View Automation 

Sent by Cursor Automation: CI Failure Auto-Fixer

davidnewhall and others added 8 commits August 27, 2026 08:47
Unstable debs already go to golift/unstable, so encoding CHANNEL in the Debian version only added noise. Keep uniqueness with REVISION on the templated nightly.version_template.

Co-authored-by: Cursor <cursoragent@cursor.com>
nightly.version_template reads .Env.REVISION; the action env map did not include it, so uniqueness never reached nFPM.

Co-authored-by: Cursor <cursoragent@cursor.com>
getlantern attached the menu to the status item; energye only fires click callbacks. Without ShowMenu, the macOS menu-bar icon (and Windows left-click) does nothing.

Co-authored-by: Cursor <cursoragent@cursor.com>
…unstable.golift.io.

Quill cannot notarize an .app/DMG from Linux, and versioned GoReleaser archives break auto-update URLs.

Co-authored-by: Cursor <cursoragent@cursor.com>
signerd 401'd because the split job had no id-token; Darwin died on an
empty repo MACOS_SIGN_PASSWORD that shadowed the org secret.

Co-authored-by: Cursor <cursoragent@cursor.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants