build: add helper provisioning profile

This commit is contained in:
osy
2021-05-12 16:20:55 -07:00
parent d00b7641a6
commit bb2656b7e3
2 changed files with 12 additions and 2 deletions
+7 -1
View File
@@ -222,6 +222,11 @@ jobs:
env:
PROFILE_DATA: ${{ secrets.PROFILE_DATA }}
PROFILE_UUID: ${{ secrets.PROFILE_UUID }}
- name: Install Helper Provisioning Profile
run: echo $PROFILE_DATA | base64 --decode -o ~/Library/MobileDevice/Provisioning\ Profiles/$PROFILE_UUID.provisionprofile
env:
PROFILE_DATA: ${{ secrets.HELPER_PROFILE_DATA }}
PROFILE_UUID: ${{ secrets.HELPER_PROFILE_UUID }}
- name: Download Artifact
uses: actions/download-artifact@v1
with:
@@ -229,10 +234,11 @@ jobs:
- name: Fixup Permissions
run: find UTM-macos-universal/UTM.xcarchive -type f \( -path '*/Contents/MacOS/*' -or -path '*/Frameworks/*.dylib' \) -exec chmod +x \{\} \;
- name: Package for Release
run: ./scripts/package_mac.sh developer-id UTM-macos-universal/UTM.xcarchive . "$SIGNING_TEAM_ID" "$PROFILE_UUID"
run: ./scripts/package_mac.sh developer-id UTM-macos-universal/UTM.xcarchive . "$SIGNING_TEAM_ID" "$PROFILE_UUID" "$HELPER_PROFILE_UUID"
env:
SIGNING_TEAM_ID: ${{ secrets.SIGNING_TEAM_ID }}
PROFILE_UUID: ${{ secrets.PROFILE_UUID }}
HELPER_PROFILE_UUID: ${{ secrets.HELPER_PROFILE_UUID }}
- name: Notarize app
run: npx notarize-cli --file "UTM.dmg" --bundle-id "com.utmapp.UTM"
env:
+5 -1
View File
@@ -8,13 +8,14 @@ command -v realpath >/dev/null 2>&1 || realpath() {
BASEDIR="$(dirname "$(realpath $0)")"
if [ $# -lt 3 ]; then
echo "usage: $0 MODE UTM.xcarchive outputPath [TEAM_ID PROFILE_NAME]"
echo "usage: $0 MODE UTM.xcarchive outputPath [TEAM_ID PROFILE_NAME HELPER_PROFILE_NAME]"
echo " MODE is one of:"
echo " unsigned (unsigned DMG)"
echo " developer-id (signed DMG)"
echo " app-store (Mac App Store package)"
echo " TEAM_ID is required if not unsigned"
echo " PROFILE_NAME is required if not unsigned, can be the name or UUID"
echo " HELPER_PROFILE_NAME is required if not unsigned, can be the name or UUID"
exit 1
fi
@@ -23,6 +24,7 @@ INPUT=$2
OUTPUT=$3
TEAM_ID=$4
PROFILE_NAME=$5
HELPER_PROFILE_NAME=$6
OPTIONS="/tmp/options.plist"
SIGNED="/tmp/signed"
UTM_ENTITLEMENTS="/tmp/utm.entitlements"
@@ -45,6 +47,8 @@ cat >"$OPTIONS" <<EOL
<dict>
<key>com.utmapp.UTM</key>
<string>${PROFILE_NAME}</string>
<key>com.utmapp.QEMUHelper</key>
<string>${HELPER_PROFILE_NAME}</string>
</dict>
<key>signingStyle</key>
<string>manual</string>