Skip to content

armgit / ente

Public Imported from GitHub
0

πŸ’š End-to-end encrypted cloud for everything.

Restore Auth macOS keychain entitlement signing

Manav Rathi7943d837108d
diff --git a/.github/workflows/auth-beta-release.yml b/.github/workflows/auth-beta-release.yml
index dcbb99ef99..c3f748d000 100644
--- a/.github/workflows/auth-beta-release.yml
+++ b/.github/workflows/auth-beta-release.yml
@@ -386,6 +386,16 @@ jobs:
run: |
pip3 install codemagic-cli-tools --break-system-packages
+ - name: Add provisioning profiles
+ run: |
+ PROFILES_HOME="$HOME/Library/MobileDevice/Provisioning Profiles"
+ mkdir -p "$PROFILES_HOME"
+ PROFILE_PATH="$(mktemp "$PROFILES_HOME"/$(uuidgen).provisionprofile)"
+ echo ${CM_PROVISIONING_PROFILE} | base64 --decode > "$PROFILE_PATH"
+ echo "Saved provisioning profile $PROFILE_PATH"
+ env:
+ CM_PROVISIONING_PROFILE: ${{ secrets.MAC_OS_BUILD_PROVISION_PROFILE_BASE64 }}
+
- name: Add certificates
run: |
# create variables
@@ -398,6 +408,9 @@ jobs:
keychain initialize
keychain add-certificates --certificate $CERTIFICATE_PATH --certificate-password $P12_PASSWORD
+ # Use profile in current project
+ xcode-project use-profiles --project=macos/**/*.xcodeproj
+
signing_settings="$RUNNER_TEMP/auth-macos-ci-signing.xcconfig"
printf '%s\n' \
'CODE_SIGN_IDENTITY = Developer ID Application' \
diff --git a/.github/workflows/auth-release.yml b/.github/workflows/auth-release.yml
index aa8a1cede8..737b2c744d 100644
--- a/.github/workflows/auth-release.yml
+++ b/.github/workflows/auth-release.yml
@@ -330,6 +330,16 @@ jobs:
run: |
pip3 install codemagic-cli-tools --break-system-packages
+ - name: Add provisioning profiles
+ run: |
+ PROFILES_HOME="$HOME/Library/MobileDevice/Provisioning Profiles"
+ mkdir -p "$PROFILES_HOME"
+ PROFILE_PATH="$(mktemp "$PROFILES_HOME"/$(uuidgen).provisionprofile)"
+ echo ${CM_PROVISIONING_PROFILE} | base64 --decode > "$PROFILE_PATH"
+ echo "Saved provisioning profile $PROFILE_PATH"
+ env:
+ CM_PROVISIONING_PROFILE: ${{ secrets.MAC_OS_BUILD_PROVISION_PROFILE_BASE64 }}
+
- name: Add certificates
run: |
# create variables
@@ -342,6 +352,9 @@ jobs:
keychain initialize
keychain add-certificates --certificate $CERTIFICATE_PATH --certificate-password $P12_PASSWORD
+ # Use profile in current project
+ xcode-project use-profiles --project=macos/**/*.xcodeproj
+
signing_settings="$RUNNER_TEMP/auth-macos-ci-signing.xcconfig"
printf '%s\n' \
'CODE_SIGN_IDENTITY = Developer ID Application' \
diff --git a/mobile/apps/auth/macos/Runner/DebugProfile.entitlements b/mobile/apps/auth/macos/Runner/DebugProfile.entitlements
index 07c1e65cf9..7fd3249a10 100644
--- a/mobile/apps/auth/macos/Runner/DebugProfile.entitlements
+++ b/mobile/apps/auth/macos/Runner/DebugProfile.entitlements
@@ -14,6 +14,8 @@
<true/>
<key>com.apple.security.files.bookmarks.app-scope</key>
<true/>
+ <key>keychain-access-groups</key>
+ <array/>
<key>com.apple.security.files.downloads.read-write</key>
<true/>
</dict>
diff --git a/mobile/apps/auth/macos/Runner/Release.entitlements b/mobile/apps/auth/macos/Runner/Release.entitlements
index 36331c7096..27aed6bb2d 100644
--- a/mobile/apps/auth/macos/Runner/Release.entitlements
+++ b/mobile/apps/auth/macos/Runner/Release.entitlements
@@ -12,5 +12,7 @@
<true/>
<key>com.apple.security.network.client</key>
<true/>
+ <key>keychain-access-groups</key>
+ <array/>
</dict>
</plist>