@@ -41,24 +41,50 @@ jobs:
4141 run : npm run dist
4242 env :
4343 GH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
44+ CSC_IDENTITY_AUTO_DISCOVERY : false
4445
45- - name : Ad hoc code signing ( macOS)
46+ - name : Ad- hoc sign macOS app
4647 if : matrix.os == 'macos-latest'
4748 run : |
48- # Find the built app
49- APP_PATH=$(find dist -name "*.app" -type d | head -1)
50- if [ -n "$APP_PATH" ]; then
51- echo "Applying ad hoc signature to: $APP_PATH"
52- # Remove existing signature
53- codesign --remove-signature "$APP_PATH"
54- # Apply new signature with deep option
49+ # Find all .app bundles
50+ find dist -name "*.app" -type d | while read -r APP_PATH; do
51+ echo "Ad-hoc signing: $APP_PATH"
52+
53+ # Remove extended attributes
54+ xattr -cr "$APP_PATH"
55+
56+ # Remove existing signatures
57+ find "$APP_PATH" -type f -perm +111 -exec codesign --remove-signature {} \; 2>/dev/null || true
58+ find "$APP_PATH" -name "*.dylib" -exec codesign --remove-signature {} \; 2>/dev/null || true
59+ find "$APP_PATH" -name "*.framework" -exec codesign --remove-signature {} \; 2>/dev/null || true
60+ find "$APP_PATH" -name "*.app" -exec codesign --remove-signature {} \; 2>/dev/null || true
61+
62+ # Sign frameworks
63+ find "$APP_PATH/Contents/Frameworks" -name "*.framework" -type d | while read -r framework; do
64+ codesign --force --deep --sign - "$framework"
65+ done
66+
67+ # Sign helper apps
68+ find "$APP_PATH/Contents" -name "*.app" -type d -not -path "$APP_PATH" | while read -r helper; do
69+ codesign --force --deep --sign - "$helper"
70+ done
71+
72+ # Sign libraries
73+ find "$APP_PATH" -name "*.dylib" -o -name "*.so" | while read -r lib; do
74+ codesign --force --sign - "$lib"
75+ done
76+
77+ # Sign executables
78+ find "$APP_PATH" -type f -perm +111 | while read -r exe; do
79+ codesign --force --sign - "$exe" 2>/dev/null || true
80+ done
81+
82+ # Sign main app
5583 codesign --force --deep --sign - "$APP_PATH"
56- echo "Ad hoc signature applied successfully"
57- # Verify signature
58- codesign --verify --verbose "$APP_PATH"
59- else
60- echo "No .app bundle found in dist directory"
61- fi
84+
85+ # Verify
86+ codesign --verify --deep --verbose "$APP_PATH" || echo "Verification warning (expected for ad-hoc signing)"
87+ done
6288
6389 - name : Upload artifacts (macOS)
6490 if : matrix.os == 'macos-latest'
6894 path : |
6995 dist/*.dmg
7096 dist/*.zip
97+ dist/*-mac.zip
98+ dist/*-mac-*.zip
7199
72100 - name : Upload artifacts (Windows)
73101 if : matrix.os == 'windows-latest'
87115 dist/*.AppImage
88116 dist/*.deb
89117 dist/*.rpm
118+ dist/*.snap
90119
91120 release :
92121 if : startsWith(github.ref, 'refs/tags/')
@@ -105,13 +134,20 @@ jobs:
105134 path : ./artifacts
106135
107136 - name : Display structure of downloaded files
108- run : ls -la artifacts/
137+ run : ls -la artifacts/*/
109138
110139 - name : Create Release
111140 uses : softprops/action-gh-release@v2
112141 with :
113142 files : |
114- artifacts/**/*
143+ artifacts/**/*.dmg
144+ artifacts/**/*.zip
145+ artifacts/**/*.exe
146+ artifacts/**/*.msi
147+ artifacts/**/*.AppImage
148+ artifacts/**/*.deb
149+ artifacts/**/*.rpm
150+ artifacts/**/*.snap
115151 draft : false
116152 prerelease : false
117153 generate_release_notes : true
0 commit comments