-
Notifications
You must be signed in to change notification settings - Fork 7.8k
#2426 Enable darwin arm64 builds in goreleaser #4435
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
Conversation
As available in v1.16+ https://tip.golang.org/doc/go1.16#darwin
|
@beret Thanks for the suggestion! I've published a prerelease with the contents of your PR applied. This generated an |
|
tl;dr - It appears to run just as well as the amd64 build, adds an ad-hoc signature to satisfy the platform requirements, notarization still is grumpy but that's not news. Running from a terminal prior to override will be blocked with a dialog warning that it cannot be opened to check for malicious software. (Presumably due to notarization?) Bypassing can be done as usual, by manually opening the After explicit right-click "Open" action in Finder: This behavior is exactly the same on the prerelease AMD64 binary when run on the same M1 machine. (blocked by default, approval via Finder works, subsequent CLI use OK, but this time with Rosetta2 translation applied automatically.) The arm64 binary does get an ad-hoc signature, it just doesn't appear to have an Apple approved developer cert. (amd64 doesn't have one generated by the same default build process, in line with the existing amd64 darwin norms.) |
|
You'll need to codesign, which has to be done on MacOS. https://github.com/mitchellh/gon My understanding of goreleaser was that this should work, but I never got it working. The other problem I had was that I was hard coding the binary into gon.hcl, which can probably be solved by understanding goreleaser variables better: gon.hcl is basically this: Updated:
|
|
@mislav ty for closing my PR, I've gone back and looked at what I had to do locally, Hope this helps. |
|
I hadn't fully grokked this when I did my signing: |
|
@beret We still want to do this, but in the interest of cleaning the backlog, I'm going to close this for now. We can't merge this as-is since I presume that the built binary won't be much use on M1 computers without having been signed/notarized. Since this last part is actually pretty tricky, we'll do it later when our team has some M1 machines to actually test on. Without that, changing our release pipeline would probably be too much guesswork for now. Please follow #2426 for updates. |
|
Totally makes sense; sorting it out with signing is the better path. Thanks for the update! |



Fixes #2426
As available in v1.16+ https://tip.golang.org/doc/go1.16#darwin
I have M1 HW and can test further automated builds.