@@ -45,17 +45,103 @@ jobs:
4545 - name : Build Wails app
4646 run : |
4747 wails build
48+
49+ # macOS signing and notarization
50+ - name : Import Code Signing Certificate
51+ if : matrix.platform == 'macos-26'
52+ env :
53+ CERTIFICATE_P12 : ${{ secrets.APPLE_DEVELOPER_CERTIFICATE_P12_BASE64 }}
54+ CERTIFICATE_PASSWORD : ${{ secrets.APPLE_DEVELOPER_CERTIFICATE_PASSWORD }}
55+ KEYCHAIN_PASSWORD : ${{ secrets.KEYCHAIN_PASSWORD }}
56+ run : |
57+ # Create variables
58+ CERTIFICATE_PATH=$RUNNER_TEMP/build_certificate.p12
59+ KEYCHAIN_PATH=$RUNNER_TEMP/app-signing.keychain-db
60+
61+ # Import certificate from secrets
62+ echo -n "$CERTIFICATE_P12" | base64 --decode -o $CERTIFICATE_PATH
63+
64+ # Create temporary keychain
65+ security create-keychain -p "$KEYCHAIN_PASSWORD" $KEYCHAIN_PATH
66+ security set-keychain-settings -lut 21600 $KEYCHAIN_PATH
67+ security unlock-keychain -p "$KEYCHAIN_PASSWORD" $KEYCHAIN_PATH
68+
69+ # Import certificate to keychain
70+ security import $CERTIFICATE_PATH -P "$CERTIFICATE_PASSWORD" -A -t cert -f pkcs12 -k $KEYCHAIN_PATH
71+ security list-keychain -d user -s $KEYCHAIN_PATH
72+
73+ # Allow codesign to access the keychain
74+ security set-key-partition-list -S apple-tool:,apple:,codesign: -s -k "$KEYCHAIN_PASSWORD" $KEYCHAIN_PATH
75+
76+ - name : Code Sign Application
77+ if : matrix.platform == 'macos-26'
78+ env :
79+ APPLE_TEAM_ID : ${{ secrets.APPLE_TEAM_ID }}
80+ run : |
81+ # Sign the application
82+ codesign --deep --force --verify --verbose --sign "Developer ID Application: Mint Miao ($APPLE_TEAM_ID)" \
83+ --options runtime \
84+ --entitlements build/darwin/entitlements.plist \
85+ build/bin/VisionFlow.app
86+
87+ # Verify signature
88+ codesign --verify --deep --strict --verbose=2 build/bin/VisionFlow.app
89+
90+ - name : Create DMG
91+ if : matrix.platform == 'macos-26'
92+ run : |
93+ # Install create-dmg
94+ brew install create-dmg
95+
96+ # Create DMG
97+ create-dmg \
98+ --volname "VisionFlow" \
99+ --volicon "build/appicon.png" \
100+ --window-pos 200 120 \
101+ --window-size 800 400 \
102+ --icon-size 100 \
103+ --icon "VisionFlow.app" 200 190 \
104+ --hide-extension "VisionFlow.app" \
105+ --app-drop-link 600 185 \
106+ "VisionFlow.dmg" \
107+ "build/bin/VisionFlow.app"
108+
109+ - name : Code Sign DMG
110+ if : matrix.platform == 'macos-26'
111+ env :
112+ APPLE_TEAM_ID : ${{ secrets.APPLE_TEAM_ID }}
113+ run : |
114+ codesign --force --sign "Developer ID Application: Mint Miao ($APPLE_TEAM_ID)" VisionFlow.dmg
115+ codesign --verify --verbose=2 VisionFlow.dmg
116+
117+ - name : Notarize Application
118+ if : matrix.platform == 'macos-26'
119+ env :
120+ APPLE_ID : ${{ secrets.APPLE_ID }}
121+ APPLE_ID_PASSWORD : ${{ secrets.APPLE_ID_PASSWORD }}
122+ APPLE_TEAM_ID : ${{ secrets.APPLE_TEAM_ID }}
123+ run : |
124+ # Submit for notarization
125+ xcrun notarytool submit VisionFlow.dmg \
126+ --apple-id "$APPLE_ID" \
127+ --password "$APPLE_ID_PASSWORD" \
128+ --team-id "$APPLE_TEAM_ID" \
129+ --wait
130+
131+ # Staple the notarization ticket
132+ xcrun stapler staple VisionFlow.dmg
133+
134+ # Verify notarization
135+ xcrun stapler validate VisionFlow.dmg
136+
48137 - name : upload artifacts macOS
49138 if : matrix.platform == 'macos-26'
50139 uses : actions/upload-artifact@v4
51140 with :
52141 name : VisionFlow-macos
53- path : build/bin/*
54- - name : archive application
55- if : matrix.platform == 'macos-26'
56- run : |
57- cd build/bin
58- zip -r ../../VisionFlow-macos.zip VisionFlow.app
142+ path : |
143+ build/bin/*
144+ VisionFlow.dmg
59145 - name : upload artifacts windows
60146 if : matrix.platform == 'windows-latest'
61147 uses : actions/upload-artifact@v4
66152 if : matrix.platform == 'macos-26'
67153 uses : ncipollo/release-action@v1
68154 with :
69- artifacts : VisionFlow-macos.zip
155+ artifacts : VisionFlow.dmg
70156 allowUpdates : true
71157 omitBody : true
72158 - name : Upload release Windows
0 commit comments