Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
rsora merged 5 commits intomasterfromrsora/notarization-ci
Feb 12, 2020

Conversation

@rsora
Copy link
Contributor

@rsorarsora commentedFeb 11, 2020
edited
Loading

What:

This PR Integrates the Notarization process in the Arduino CLI Relese pipeline.

Why:

As perApple announcement:

Beginning in macOS 10.14.5, software signed with a new Developer ID certificate and all new or updated kernel extensions must be notarized to run. Beginning in macOS 10.15, all software built after June 1, 2019, and distributed with Developer ID must be notarized.

How:

The PR moves the responsibility of GitHub release creation and Arduino servers upload, fromgoreleaser to GH Actions steps, and adds the notarization step leveragingGon (Thanks to@mitchellh and to@zmoog who discovered the tool 😄 )

Thenotarize-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 theartifacts Github Actions feature.

A detailed explanation is required for theNotarize binary, re-package it and update checksum step, that configures the MacOskeychain with obscure osx commands and callsgon doing the following:

  1. Download keychain from GH secrets and decode it from base64
  2. Add the keychain to the system keychains and unlock it
  3. Call Gon to start notarization process (using AC_USERNAME and AC_PASSWORD secrets)
  4. Repackage the signed binary replaced in place by Gon (ignoring the output zip file)
  5. Recalculate package checksum and replace it in the goreleasernnnnnn-checksums.txt file

Pros:

This way we do not lose:

  1. the "build reproducibility", because we still usegoreleaser plusmultiarch/crossbuild container to produce the artifacts
  2. the automatic changelog generation fromgoreleaser
  3. the automatic checksum file generation fromgoreleaser

Cons:

  • We add a bit of complexity to therelease workflow (that is acceptable in the end, having handy GitHub actions ready to use).
  • We lost a portion of my mental health 😸

@gvariscogvarisco self-requested a reviewFebruary 11, 2020 16:18
Copy link
Contributor

@gvariscogvarisco left a comment

Choose a reason for hiding this comment

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

LGTM

@rsorarsora self-assigned thisFeb 11, 2020
@rsorarsora added this to the0.8.0 milestoneFeb 11, 2020
Copy link
Member

@cmagliecmaglie left a 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!

-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
Copy link
Member

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?

Copy link
ContributorAuthor

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 perGithub 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.

tag:${{ github.ref }}
file_glob:true

-name:Downloads upload
Copy link
Member

Choose a reason for hiding this comment

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

WAT? 😃

Copy link
ContributorAuthor

Choose a reason for hiding this comment

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

I'll rename it!


zip {
output_path="arduino-cli.zip"
}
Copy link
Member

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?

Copy link
ContributorAuthor

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 👍

@rsora
Copy link
ContributorAuthor

varisco-notarize

gvarisco, zmoog, and luigigubello reacted with laugh emojizmoog and luigigubello reacted with heart emoji

@rsorarsora merged commit1569a5f intomasterFeb 12, 2020
@rsorarsora deleted the rsora/notarization-ci branchFebruary 12, 2020 09:52
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@cmagliecmagliecmaglie approved these changes

+1 more reviewer

@gvariscogvariscogvarisco approved these changes

Reviewers whose approvals may not affect merge requirements

Assignees

@rsorarsora

Labels

None yet

Projects

None yet

Milestone

0.8.0

Development

Successfully merging this pull request may close these issues.

3 participants

@rsora@cmaglie@gvarisco

[8]ページ先頭

©2009-2025 Movatter.jp