actions(macos): build .dmg disk images

Signed-off-by: mctaylors <cantsendmails@mctaylors.ru>
This commit is contained in:
mctaylors 2026-03-05 14:00:38 +03:00
parent b114d043f6
commit 07ddbb76f1
No known key found for this signature in database
GPG key ID: FDDB3D7B664925F9

View file

@ -91,17 +91,35 @@ runs:
--password '${{ inputs.apple-notarize-password }}'
xcrun stapler staple "Prism Launcher.app"
rm "../PrismLauncher.zip"
else
echo ":warning: Skipping notarization as credentials are not present." >> $GITHUB_STEP_SUMMARY
fi
ditto -c -k --sequesterRsrc --keepParent "Prism Launcher.app" ../PrismLauncher.zip
- name: Create DMG
shell: bash
env:
INSTALL_DIR: install
run: |
cd ${{ env.INSTALL_DIR }}
mkdir -p src
cp -R "Prism Launcher.app" src/
ln -s /Applications src/
hdiutil create \
-volname "Prism Launcher ${{ inputs.version }}" \
-srcfolder src \
-ov -format ULMO \
"../PrismLauncher.dmg"
- name: Make Sparkle signature
shell: bash
run: |
if [ '${{ inputs.sparkle-ed25519-key }}' != '' ]; then
echo '${{ inputs.sparkle-ed25519-key }}' > ed25519-priv.pem
signature=$(/opt/homebrew/opt/openssl@3/bin/openssl pkeyutl -sign -rawin -in ${{ github.workspace }}/PrismLauncher.zip -inkey ed25519-priv.pem | openssl base64 | tr -d \\n)
signature=$(/opt/homebrew/opt/openssl@3/bin/openssl pkeyutl -sign -rawin -in ${{ github.workspace }}/PrismLauncher.dmg -inkey ed25519-priv.pem | openssl base64 | tr -d \\n)
rm ed25519-priv.pem
cat >> $GITHUB_STEP_SUMMARY << EOF
### Artifact Information :information_source:
@ -118,4 +136,4 @@ runs:
uses: actions/upload-artifact@v6
with:
name: PrismLauncher-${{ inputs.artifact-name }}-${{ inputs.version }}-${{ inputs.build-type }}
path: PrismLauncher.zip
path: PrismLauncher.dmg