Skip to content

Commit fe84f43

Browse files
authored
feat(ci): macos app sign & notary (#26)
* feat(ci): macos app sign & notary * fix(ci): remove macOS application archiving step and update artifact uploads * fix: update CFBundleIdentifier in Info.plist and enhance product info in wails.json
1 parent cd481dc commit fe84f43

File tree

5 files changed

+117
-10
lines changed

5 files changed

+117
-10
lines changed

.github/workflows/release.yml

Lines changed: 93 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -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
@@ -66,7 +152,7 @@ jobs:
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

build/darwin/Info.plist

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
<key>CFBundleExecutable</key>
99
<string>{{.OutputFilename}}</string>
1010
<key>CFBundleIdentifier</key>
11-
<string>com.wails.{{.Name}}</string>
11+
<string>art.vision-flow.app</string>
1212
<key>CFBundleVersion</key>
1313
<string>{{.Info.ProductVersion}}</string>
1414
<key>CFBundleGetInfoString</key>

build/darwin/entitlements.plist

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3+
<plist version="1.0">
4+
<dict>
5+
<key>com.apple.security.app-sandbox</key>
6+
<true/>
7+
<key>com.apple.security.network.client</key>
8+
<true/>
9+
<key>com.apple.security.network.server</key>
10+
<true/>
11+
<key>com.apple.security.files.user-selected.read-write</key>
12+
<true/>
13+
<key>com.apple.security.files.downloads.read-write</key>
14+
<true/>
15+
</dict>
16+
</plist>

main.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,8 @@ func main() {
9292
aiService,
9393
appService,
9494
},
95-
OnStartup: aiService.SetContext,
95+
HideWindowOnClose: true,
96+
OnStartup: aiService.SetContext,
9697
Mac: &mac.Options{
9798
TitleBar: mac.TitleBarHiddenInset(),
9899
},

wails.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@
1111
"email": "[email protected]"
1212
},
1313
"info": {
14-
"productVersion": "0.0.1"
14+
"companyName": "MiaoMint",
15+
"productName": "VisionFlow",
16+
"productVersion": "0.0.1",
17+
"copyright": "Copyright © 2026 MiaoMint. All rights reserved.",
18+
"comments": "VisionFlow - Visual AI Workflow Builder"
1519
}
1620
}

0 commit comments

Comments
 (0)