Skip to content

Commit fa98df9

Browse files
committed
feat: Add macOS code signing to desktop build
- Introduce macOS code signing to the desktop build process. - Add a new script (`import_macos_dev_id_cert.sh`) to import the Developer ID certificate into the keychain on macOS runners. - Update the `desktop.yaml` workflow to execute the import script for macOS jobs. - Add the `macOS_development.p12` certificate to GPG encryption/decryption scripts and integrity checks. - Add `macOS_development.p12` to `.gitignore` to prevent committing the raw certificate. - Increment the desktop app `packageVersion` to `8.4.603`.
1 parent 898cfdc commit fa98df9

15 files changed

+29
-5
lines changed
Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,12 @@
11
#!/bin/sh
22

33
echo "28d0921e0d134ac1655c3b93e675ed50aa77233d02966130beff857fb60cf4f6 ./app/android/keystore.properties" | sha256sum -c -
4-
54
echo "cc018f4fb00ec66cf3b8d918ce4db107945502ab7c47dd0c33fc10e56d79d1a2 ./app/android/note_room_key_store.jks" | sha256sum -c -
6-
75
echo "58e5bdf33538df1638858d0f8a8bba8161f29b4846a7b6d0aaba3279650aa04a ./app/android/fastlane/api-7350020584032910214-328107-d8d3807d1e1a.json" | sha256sum -c -
86

97
echo "7b9f841129997ddb098e03dd7099a3341dbfa012c31e4cb465b92ddd476cca7a ./app/iosApp/fastlane/28F5CB4337.json" | sha256sum -c -
10-
118
echo "e36a29b3964c8bd90030f93ac986a39510185df582a783f1b946e6127a005e38 ./app/iosApp/fastlane/ios_distribution.p12" | sha256sum -c -
12-
139
echo "4fb66d6fbe9fc4a544303e6e516da2ee3314187e28fc5aacb9631f9b42b511b0 ./app/iosApp/fastlane/NoteDelight_Distribution_Profile.mobileprovision" | sha256sum -c -
1410

1511
echo "5439f53423060953d110cb3217e089b23da20aa7559e80b32767184f2516bba0 ./app/desktop/keystore.properties" | sha256sum -c -
12+
echo "97f56f5e6e5bcefb738333f22170be94e0196c34958d778067295697a30f5068 ./app/desktop/macOS_development.p12" | sha256sum -c -

.github/scripts/decrypt_secret.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,3 +23,6 @@ gpg --quiet --batch --yes --decrypt --passphrase="$LARGE_SECRET_PASSPHRASE" \
2323

2424
gpg --quiet --batch --yes --decrypt --passphrase="$LARGE_SECRET_PASSPHRASE" \
2525
--output ./app/desktop/keystore.properties ./.github/secrets/desktop.keystore.properties.gpg
26+
27+
gpg --quiet --batch --yes --decrypt --passphrase="$LARGE_SECRET_PASSPHRASE" \
28+
--output ./app/desktop/macOS_development.p12 ./.github/secrets/macOS_development.p12.gpg

.github/scripts/encrypt_secret.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,3 +23,6 @@ gpg --symmetric --cipher-algo AES256 --batch --yes --passphrase="$LARGE_SECRET_P
2323

2424
gpg --symmetric --cipher-algo AES256 --batch --yes --passphrase="$LARGE_SECRET_PASSPHRASE" \
2525
--output ./.github/secrets/desktop.keystore.properties.gpg ./app/desktop/keystore.properties
26+
27+
gpg --symmetric --cipher-algo AES256 --batch --yes --passphrase="$LARGE_SECRET_PASSPHRASE" \
28+
--output ./.github/secrets/macOS_development.p12.gpg ./app/desktop/macOS_development.p12
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
#!/bin/sh
2+
3+
security create-keychain -p "" build.keychain
4+
security default-keychain -s build.keychain
5+
security unlock-keychain -p "" build.keychain
6+
7+
security import ./app/desktop/macOS_development.p12 \
8+
-k build.keychain \
9+
-P "$LARGE_SECRET_PASSPHRASE" \
10+
-T /usr/bin/codesign -T /usr/bin/productbuild -T /usr/bin/security
11+
12+
security set-key-partition-list -S apple-tool:,apple: -s -k "" build.keychain
0 Bytes
Binary file not shown.
Binary file not shown.
0 Bytes
Binary file not shown.
Binary file not shown.
0 Bytes
Binary file not shown.
-3 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)