3737 -appVersion "${{steps.get-version.outputs.version}}"
3838 shell : pwsh
3939
40- - name : Prepare and Sign arm64 App Bundle
41- run : |
42- # Create entitlements file
43- cat > entitlements.plist << EOF
44- <?xml version="1.0" encoding="UTF-8"?>
45- <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
46- <plist version="1.0">
47- <dict>
48- <key>com.apple.security.cs.allow-jit</key>
49- <true/>
50- <key>com.apple.security.cs.allow-unsigned-executable-memory</key>
51- <true/>
52- <key>com.apple.security.cs.disable-library-validation</key>
53- <true/>
54- </dict>
55- </plist>
56- EOF
57-
58- APP_PATH="${{ github.workspace }}/Build/PicView-v${{steps.get-version.outputs.version}}-osx-arm64/PicView.app"
59-
60- # Verify bundle structure
61- if [ ! -f "$APP_PATH/Contents/Info.plist" ]; then
62- echo "Error: Info.plist not found in the expected location"
63- exit 1
64- fi
65-
66- # Sign all dylibs and binaries
67- find "$APP_PATH/Contents/MacOS" -type f \( -name "*.dylib" -o -name "PicView.Avalonia.MacOS" \) | while read file; do
68- codesign --force --options runtime --sign - --entitlements entitlements.plist "$file"
69- done
70-
71- # Sign the app bundle
72- codesign --force --options runtime --sign - --entitlements entitlements.plist "$APP_PATH"
73- # Step 5: Create DMG for arm64
74- - name: Create DMG for arm64
75- run: |
76- hdiutil create -volname "PicView" -srcfolder "${{ github.workspace }}/Build/PicView-v${{steps.get-version.outputs.version}}-osx-arm64/PicView.app" -ov -format UDZO "${{ github.workspace }}/Build/PicView-v${{steps.get-version.outputs.version}}-osx-arm64.dmg"
77-
78-
7940 # Step 6: Upload arm64 artifacts
8041 - name : Upload arm64 artifacts
8142 uses : actions/upload-artifact@v4
@@ -95,23 +56,12 @@ jobs:
9556 -appVersion "${{steps.get-version.outputs.version}}"
9657 shell : pwsh
9758
98-
99- - name : Prepare and Sign x64 App Bundle
100- run : |
101- find "${{ github.workspace }}/Build/PicView-v${{steps.get-version.outputs.version}}-osx-x64/PicView.app" -type f -name "*.dylib" -o -name "PicView.Avalonia.MacOS" | while read file; do
102- codesign --force --options runtime --sign - --entitlements entitlements.plist "$file"
103- done
104-
105- codesign --force --options runtime --sign - --entitlements entitlements.plist "${{ github.workspace }}/Build/PicView-v${{steps.get-version.outputs.version}}-osx-x64/PicView.app"
106-
107-
10859 # Step 8: Create DMG for x64
10960 - name : Create DMG for x64
11061 run : |
11162 hdiutil create -volname "PicView" -srcfolder "${{ github.workspace }}/Build/PicView-v${{steps.get-version.outputs.version}}-osx-x64/PicView.app" -ov -format UDZO "${{ github.workspace }}/Build/PicView-v${{steps.get-version.outputs.version}}-osx-x64.dmg"
11263
11364
114-
11565 # Step 9: Upload x64 artifacts
11666 - name : Upload x64 artifacts
11767 uses : actions/upload-artifact@v4
0 commit comments