Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add goreleaser #27

Merged
merged 3 commits into from
Feb 1, 2021
Merged

Add goreleaser #27

merged 3 commits into from
Feb 1, 2021

Conversation

dbirks
Copy link
Contributor

@dbirks dbirks commented Jan 31, 2021

Ok I've got this in a place where I'm comfortable PR'ing it. (Made a bunch of test releases on my fork.)

This runs goreleaser on every push of a tag to build binaries, makes a Github Release, and then commits a ssmsh.rb file to master for the homebrew package.

More notes:

  • I bumped Go to 1.15 because I couldn't get 1.13 from my package repos, and it still built and ran nicely for me.
  • I couldn't find a way to easily trigger goreleaser on a push to the master branch AND a tag push (it always acts like it's the branch OR the tag), so I just have it triggered on tag pushes.
  • I've tested installing the homebrew tap on Linux (pointing to my fork), and it worked nicely, but MacOS is untested.
  • It was also super easy to have it build a Windows binary, but that's untested as well.
  • In the archive section, I set none* to have it only include the binary in the tar.gz or zip.

And please feel free to change/rework any pf this to your liking. I made several "executive decisions" with the readme for example. 🙂 Trying to figure out how to word the different install methods.

Closes #26

Copy link
Owner

@bwhaley bwhaley left a comment

Choose a reason for hiding this comment

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

I bumped Go to 1.15 because I couldn't get 1.13 from my package repos, and it still built and ran nicely for me.

Works for me.

I couldn't find a way to easily trigger goreleaser on a push to the master branch AND a tag push (it always acts like it's the branch OR the tag), so I just have it triggered on tag pushes.

This works for me too. I only want to cut releases with tags.

I've tested installing the homebrew tap on Linux (pointing to my fork), and it worked nicely, but MacOS is untested.

Just tested in a branch and it worked for me!

It was also super easy to have it build a Windows binary, but that's untested as well.

Got it. I expect that it will work, so will see if any Windows users report issues.

In the archive section, I set none* to have it only include the binary in the tar.gz or zip.

👍

And please feel free to change/rework any pf this to your liking. I made several "executive decisions" with the readme for example. 🙂 Trying to figure out how to word the different install methods.

Fantastic work, and most appreciated. I had just a couple of comments on the review, then this will be ready to merge. Thank you so much for this contribution - it will make life easier for me and all the other users!

version: latest
args: release --rm-dist
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Copy link
Owner

Choose a reason for hiding this comment

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

Is this confirmed to work? The docs say that secret names can't have the GITHUB_ prefix.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah the GITHUB_TOKEN is a special secret provided by github. I didn't have to create it or anything. Some docs about that here. 👍

Copy link
Owner

Choose a reason for hiding this comment

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

Ahh, got it, I missed that magic. Thanks for the link!

.goreleaser.yml Show resolved Hide resolved
Copy link
Owner

@bwhaley bwhaley left a comment

Choose a reason for hiding this comment

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

LGTM! Thanks again for this!

version: latest
args: release --rm-dist
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Copy link
Owner

Choose a reason for hiding this comment

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

Ahh, got it, I missed that magic. Thanks for the link!

@bwhaley bwhaley merged commit 2d360bc into bwhaley:master Feb 1, 2021
@dbirks dbirks deleted the add-goreleaser branch February 5, 2021 15:23
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.

Contributing a Homebrew package
2 participants