-
-
Notifications
You must be signed in to change notification settings - Fork 398
Integrate Apple notarization process into Github Actions release pipeline #578
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've only some question about details but, besides that, looks great!
.github/workflows/release.yaml
Outdated
-C ../../ LICENSE.txt | ||
CLI_CHECKSUM=$(shasum -a 256 dist/arduino-cli_${TAG}_macOS_64bit.tar.gz | cut -d " " -f 1) | ||
perl -pi -w -e "s/.*arduino-cli_${TAG}_macOS_64bit.tar.gz/${CLI_CHECKSUM} arduino-cli_${TAG}_macOS_64bit.tar.gz/g;" dist/*-checksums.txt | ||
rm -f apple-developer.keychain-db |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this should be: rm -f ~/Library/Keychains/apple-developer.keychain-db
?
BTW why deleting the file since the virtual machine is destroyed after the build?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Extra paranoia + Typo 😄 but you're right, as per Github Documentation:
You can specify the runner type for each job in a workflow. Each job in a workflow executes in a fresh instance of the virtual machine. All steps in the job execute in the same instance of the virtual machine, allowing the actions in that job to share information using the filesystem.
We can remove that step, I'll update also the PR description.
.github/workflows/release.yaml
Outdated
tag: ${{ github.ref }} | ||
file_glob: true | ||
|
||
- name: Downloads upload |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
WAT? 😃
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll rename it!
gon.config.hcl
Outdated
|
||
zip { | ||
output_path = "arduino-cli.zip" | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since we are ignoring the output zip file, can't we just remove this section and not produce it in the first place?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes you're right, I misread the documentation. I thought that at least one output format was mandatory 👍
What:
This PR Integrates the Notarization process in the Arduino CLI Relese pipeline.
Why:
As per Apple announcement:
How:
The PR moves the responsibility of GitHub release creation and Arduino servers upload, from
goreleaser
to GH Actions steps, and adds the notarization step leveraging Gon (Thanks to @mitchellh and to @zmoog who discovered the tool 😄 )The
notarize-macos
job must run on amacos-latest
VM, in order to allowgon
to orchestrate all the required notarization tools, this means that container steps cannot be used in the same job.This is why the release pipeline is split in 3 jobs that share artifacts via the
artifacts
Github Actions feature.A detailed explanation is required for the
Notarize binary, re-package it and update checksum
step, that configures the MacOskeychain
with obscure osx commands and callsgon
doing the following:nnnnnn-checksums.txt
filePros:
This way we do not lose:
goreleaser
plusmultiarch/crossbuild
container to produce the artifactsgoreleaser
goreleaser
Cons:
release
workflow (that is acceptable in the end, having handy GitHub actions ready to use).