@@ -76,29 +76,43 @@ jobs:
76
76
if : matrix.platform == 'ubuntu-latest'
77
77
run : cargo make deb
78
78
working-directory : .${{ env.working-directory }}
79
- - name : import apple certs
79
+ - name : Install the Apple certificate and provisioning profile
80
80
if : matrix.platform == 'macos-latest'
81
- uses : apple-actions/import-codesign-certs@v2
82
- continue-on-error : true
83
- with :
84
- p12-file-base64 : ${{ secrets.APPLE_SIGNING_CERT_BASE64 }}
85
- p12-password : ${{ secrets.APPLE_SIGNING_CERT_PASSWORD }}
86
- - uses : Apple-Actions/download-provisioning-profiles@v1
87
- continue-on-error : true
88
- if : matrix.platform == 'macos-latest'
89
- with :
90
- bundle-id : net.nymtech.vpn
91
- issuer-id : ${{ secrets.APPLE_APPSTORE_ISSUER_ID }}
92
- api-key-id : ${{ secrets.APPLE_APPSTORE_KEY_ID }}
93
- api-private-key : ${{ secrets.APPLE_APPSTORE_PRIVATE_KEY }}
81
+ env :
82
+ BUILD_CERTIFICATE_BASE64 : ${{ secrets.APPLE_SIGNING_CERT_BASE64 }}
83
+ P12_PASSWORD : ${{ secrets.APPLE_SIGNING_CERT_PASSWORD }}
84
+ BUILD_PROVISION_PROFILE_BASE64 : ${{ secrets.APPLE_PROVISIONING_PROFILE_BASE64 }}
85
+ KEYCHAIN_PASSWORD : ${{ secrets.KEYCHAIN_PASS }}
86
+ run : |
87
+ # create variables
88
+ CERTIFICATE_PATH=$RUNNER_TEMP/build_certificate.p12
89
+ PP_PATH=$RUNNER_TEMP/build_pp.mobileprovision
90
+ KEYCHAIN_PATH=$RUNNER_TEMP/app-signing.keychain-db
91
+
92
+ # import certificate and provisioning profile from secrets
93
+ echo -n "$BUILD_CERTIFICATE_BASE64" | base64 --decode -o $CERTIFICATE_PATH
94
+ echo -n "$BUILD_PROVISION_PROFILE_BASE64" | base64 --decode -o $PP_PATH
95
+
96
+ # create temporary keychain
97
+ security create-keychain -p "$KEYCHAIN_PASSWORD" $KEYCHAIN_PATH
98
+ security set-keychain-settings -lut 21600 $KEYCHAIN_PATH
99
+ security unlock-keychain -p "$KEYCHAIN_PASSWORD" $KEYCHAIN_PATH
100
+
101
+ # import certificate to keychain
102
+ security import $CERTIFICATE_PATH -P "$P12_PASSWORD" -A -t cert -f pkcs12 -k $KEYCHAIN_PATH
103
+ security list-keychain -d user -s $KEYCHAIN_PATH
104
+
105
+ # apply provisioning profile
106
+ mkdir -p ~/Library/MobileDevice/Provisioning\ Profiles
107
+ cp $PP_PATH ~/Library/MobileDevice/Provisioning\ Profiles
94
108
- name : build macos pkg
95
109
if : matrix.platform == 'macos-latest'
96
110
run : cargo make pkg
97
111
working-directory : .${{ env.working-directory }}
98
112
env :
99
113
APPLE_TEAM_ID : VW5DZLFHM5
100
- APPLICATION_SIGNING_IDENTITY : ' Developer ID Application : Nym Technologies SA (VW5DZLFHM5)'
101
- INSTALLER_SIGNING_IDENTITY : ' Developer ID Application : Nym Technologies SA (VW5DZLFHM5)'
114
+ APPLICATION_SIGNING_IDENTITY : ' 3rd Party Mac Developer Installer : Nym Technologies SA (VW5DZLFHM5)'
115
+ INSTALLER_SIGNING_IDENTITY : ' 3rd Party Mac Developer Installer : Nym Technologies SA (VW5DZLFHM5)'
102
116
- name : install arc windows
103
117
if : matrix.platform == 'windows-latest'
104
118
uses : crazy-max/ghaction-chocolatey@v3
0 commit comments