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

build(macos): Sign macOS binaries #2401

Open
wants to merge 14 commits into
base: master
Choose a base branch
from

Conversation

szokeasaurusrex
Copy link
Member

@szokeasaurusrex szokeasaurusrex commented Feb 20, 2025

Closes #1882

@szokeasaurusrex szokeasaurusrex requested a review from BYK February 20, 2025 10:07
@szokeasaurusrex szokeasaurusrex marked this pull request as ready for review February 20, 2025 10:21
@szokeasaurusrex szokeasaurusrex force-pushed the szokeasaurusrex/sign-macos branch from 6e1650f to 4549c90 Compare February 20, 2025 10:27
@szokeasaurusrex szokeasaurusrex force-pushed the szokeasaurusrex/sign-macos branch from 4549c90 to e33d3ac Compare February 20, 2025 14:13
Copy link
Member

@BYK BYK left a comment

Choose a reason for hiding this comment

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

I think this looks pretty great!

It might be worth adding a smoke test after signing and notarization that just runs the binary and makes sure it doesn't exit with a non-zero code.

Comment on lines +129 to +130
echo $APPLE_CERT_DATA | base64 --decode > ${{ env.APPLE_CERT_PATH }}
echo $APPLE_API_KEY | base64 --decode > ${{ env.APPLE_API_KEY_PATH }}
Copy link
Member

Choose a reason for hiding this comment

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

Safer

Suggested change
echo $APPLE_CERT_DATA | base64 --decode > ${{ env.APPLE_CERT_PATH }}
echo $APPLE_API_KEY | base64 --decode > ${{ env.APPLE_API_KEY_PATH }}
echo "$APPLE_CERT_DATA" | base64 --decode > ${{ env.APPLE_CERT_PATH }}
echo "$APPLE_API_KEY" | base64 --decode > ${{ env.APPLE_API_KEY_PATH }}

Comment on lines +127 to +130
- name: Install `rcodesign`
run: |
curl -L https://github.com/indygreg/apple-platform-rs/releases/download/apple-codesign%2F0.29.0/apple-codesign-0.29.0-x86_64-unknown-linux-musl.tar.gz | tar -xz --strip-components=1
mv rcodesign /usr/local/bin/rcodesign
Copy link
Member

Choose a reason for hiding this comment

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

Recommend adding a step here that verifies the expected SHA256 checksum.

https://github.com/indygreg/apple-platform-rs/releases/download/apple-codesign%2F0.29.0/apple-codesign-0.29.0-aarch64-unknown-linux-musl.tar.gz.sha256
4af92c87ddf52f5f2d1258a3b4e56c7dcb8f1b2468df744976c5f139e031961f

Copy link
Member

Choose a reason for hiding this comment

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

I think this is a good idea as I forgot releases can be mutable.

Copy link
Member

Choose a reason for hiding this comment

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

Copy link
Member

Choose a reason for hiding this comment

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

Note that the SHA256 @mdtro shared is for arm64 so different in my PR.

Copy link
Member

Choose a reason for hiding this comment

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

Oh woops. That's my mistake. 😅

Copy link
Member

Choose a reason for hiding this comment

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

No worries, I made the same mistake even when I thought I was looking very closely :D

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.

sentry-cli for macOS doesn't seem to be signed properly
3 participants