Skip to content

fix goreleaser - #166

Merged
anacrolix merged 6 commits into
anacrolix:masterfrom
Efreak:fix-goreleaser
Jul 25, 2025
Merged

anacrolix merged 6 commits into
anacrolix:masterfrom
Efreak:fix-goreleaser

Conversation

@Efreak

@Efreak Efreak commented Jul 24, 2025

Copy link
Copy Markdown
Collaborator
  • add goreleaser again
  • run on release
  • add goos matrix
  • add upx
  • directly upload binaries, don't zip them
  • only run the action once

I've included binaries for 3 main architectures (amd64, arm64, and arm for old NAS), and for 4 OS: Windows, Linux, macos, and freebsd (because freebsd is mentioned in the readme). goreleaser is smart enough not to build impossible armv7 macos, but it builds an unnecessary armv7 windows binary that I haven't bothered to remove.

goreleaser can do a bunch of other stuff as well

  • create installers and publish them to winget, chocolatey, scoop
  • Linux packages (include completions and man pages?)
  • publish releases automatically on github when you create a tag

Efreak added 6 commits July 23, 2025 14:44
windows, linux, and macos
amd64, arm4, and arm (older nas)
they're already compressed with upx, zipping is pointless
@anacrolix
anacrolix merged commit 2cd44d5 into anacrolix:master Jul 25, 2025
@anacrolix

Copy link
Copy Markdown
Owner

Cheers

@Efreak

Efreak commented Aug 2, 2025

Copy link
Copy Markdown
Collaborator Author

@anacrolix this failed on the docker action, it never got to the goreleaser action.

@Efreak

Efreak commented Aug 2, 2025

Copy link
Copy Markdown
Collaborator Author

Never mind, the docker action failed separately. This action never ran because it only runs on a release and last release was before this. I'll add a workflow-dispatch action so it can be run manually.

@Efreak

Efreak commented Aug 2, 2025 •

Copy link
Copy Markdown
Collaborator Author

You can cherry-pick 9b5ac62 to get a button in actions to run the releaser manually.
Use curl https://github.com/efreak/dms/commit/9b5ac627e8339801a9bb4facb22cd7246a0a994e.patch | git am if you're local, or just merge https://github.com/Efreak/dms/tree/fix-goreleaser

I tried accepting the collaboration request from before, but it expired 🤷

@anacrolix

Copy link
Copy Markdown
Owner

@Efreak I reinvited you.

@Efreak

Efreak commented Aug 20, 2025

Copy link
Copy Markdown
Collaborator Author

@anacrolix

Success! The action works. This should continue working automatically for the foreseeable future (until something changes with goreleaser action (such as the repo for the GitHub action being removed), or something changes with go to make it incompatible with the current version of goreleaser, in which case hopefully updating the goreleaser action would fix it). I went to the trouble of having GitHub run the action from a second branch so I could have it check out the current version of dms, as it refused to run against a tag that has a different commit. You can remove that branch (1.7.2) if you want. (I didn't do this on my own repo because I thought it would actually be a one-commit fix and didn't anticipate goreleaser being smart about what commit it's being run on).

If you want to add architectures or systems other than those currently included, modify the goreleaser.conf file to add a valid goos or goarch. Having too many builds in release is annoying so I only added these for now, but I've seen GitHub releases with as many as 36 artifacts.

I did accidentally upload a few extra containers (I forgot/was too slow to cancel the action), but they're all the same version of dms (the only files I touched were in .github) so that shouldn't actually be an issue.

@anacrolix

Copy link
Copy Markdown
Owner

Thanks @Efreak. I'm happy to follow your lead on it.

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.

2 participants