@@ -21,46 +21,80 @@ jobs:
2121 run : |
2222 brew install cocoapods || true
2323
24- - name : Build universal with Xcode
24+ - name : Build per-architecture variants
2525 run : |
2626 set -euo pipefail
2727
2828 PROJECT="Micmute.xcodeproj"
2929 SCHEME="Micmute"
3030 CONFIG="Release"
31- DERIVED="build_output/universal"
32-
33- # Clean previous builds
34- rm -rf "$DERIVED"
35-
36- # Build universal binary directly with Xcode
37- xcodebuild clean build \
38- -project "$PROJECT" \
39- -scheme "$SCHEME" \
40- -configuration "$CONFIG" \
41- -derivedDataPath "$DERIVED" \
42- -arch arm64 \
43- -arch x86_64 \
44- CODE_SIGN_IDENTITY="" \
31+
32+ build_variant() {
33+ local identifier="$1"
34+ local arch_flag="$2"
35+
36+ rm -rf "build_output/${identifier}"
37+ xcodebuild clean build \
38+ -project "$PROJECT" \
39+ -scheme "$SCHEME" \
40+ -configuration "$CONFIG" \
41+ -derivedDataPath "build_output/${identifier}" \
42+ -arch "$arch_flag" \
43+ CODE_SIGN_IDENTITY="" \
44+ CODE_SIGNING_REQUIRED=NO \
45+ CODE_SIGNING_ALLOWED=NO \
46+ CODE_SIGN_ENTITLEMENTS=""
47+ }
48+
49+ build_variant arm64 arm64
50+ build_variant x86_64 x86_64
51+ run : |
52+ - name : Re-seal app bundles
53+
54+ PROJECT="Micmute.xcodeproj"
55+ SCHEME="Micmute"
56+ reseal_variant() {
57+ local identifier="$1"
58+ local app_path="build_output/${identifier}/Build/Products/Release/Micmute.app"
59+
60+ if [ ! -d "$app_path" ]; then
61+ echo "App bundle not found at $app_path" >&2
62+ exit 1
63+ fi
64+
65+ chmod +x "$app_path/Contents/MacOS/Micmute" || true
66+ xattr -cr "$app_path" || true
67+ codesign -f --deep -s - "$app_path" || true
68+ }
69+
70+ reseal_variant arm64
71+ reseal_variant x86_64
4572 CODE_SIGNING_REQUIRED=NO \
46- CODE_SIGNING_ALLOWED=NO \
73+ - name : Verify binaries and bundles
4774 CODE_SIGN_ENTITLEMENTS=""
4875
4976 - name : Verify and re-seal app bundle
50- run : |
51- set -euo pipefail
77+ verify_variant() {
78+ local identifier="$1"
79+ local label="$2"
80+ local app_path="build_output/${identifier}/Build/Products/Release/Micmute.app"
5281
53- APP="build_output/universal/Build/Products/Release/Micmute.app"
82+ echo "=== ${label} binary architecture check ==="
83+ file "$app_path/Contents/MacOS/Micmute"
84+ otool -hv "$app_path/Contents/MacOS/Micmute" || true
5485
55- # Verify the app exists
56- if [ ! -d "$APP" ]; then
57- echo "App bundle not found at $APP" >&2
58- exit 1
59- fi
86+ echo "=== ${label} bundle Info.plist check ==="
87+ plutil -p "$app_path/Contents/Info.plist" | egrep 'CFBundleExecutable|CFBundleIdentifier|LSMinimumSystemVersion' || true
88+
89+ echo "=== ${label} code signing verification ==="
90+ codesign -vvv --deep --strict "$app_path" || true
6091
61- # Ensure executable bits are set
62- chmod +x "$APP/Contents/MacOS/Micmute" || true
92+ echo "=== ${label} Gatekeeper assessment ==="
93+ spctl --assess --type execute -v "$app_path" || true
94+ }
6395
96+ verify_variant arm64 "arm64"
97+ verify_variant x86_64 "Intel"
6498 # Clear extended attributes that might cause issues
6599 xattr -cr "$APP" || true
66100
@@ -94,40 +128,42 @@ jobs:
94128 RELEASE_DIR_ABS="$(pwd)/$RELEASE_DIR"
95129 mkdir -p "$RELEASE_DIR_ABS"
96130
97- APP_SOURCE="build_output/universal/Build/Products/Release/Micmute.app"
98- STAGING="$RELEASE_DIR_ABS/staging-universal"
131+ package_variant() {
132+ local identifier="$1"
133+ local label="$2"
134+ local source="build_output/${identifier}/Build/Products/Release/Micmute.app"
135+ local staging="$RELEASE_DIR_ABS/staging-${label}"
99136
100- # Clean staging area
101- rm -rf "$STAGING"
102- mkdir -p "$STAGING"
137+ rm -rf "$staging"
138+ mkdir -p "$staging"
103139
104- # Copy app to staging
105- ditto "$APP_SOURCE" "$STAGING/Micmute.app"
140+ ditto "$source" "$staging/Micmute.app"
106141
107- # Create zip from staging
108- pushd "$STAGING" >/dev/null
109- ditto -c -k --sequesterRsrc --keepParent "Micmute.app" "$RELEASE_DIR_ABS/Micmute-universal.zip"
110- popd >/dev/null
142+ pushd "$staging" >/dev/null
143+ ditto -c -k --sequesterRsrc --keepParent "Micmute.app" "$RELEASE_DIR_ABS/Micmute-${label}.zip"
144+ popd >/dev/null
111145
112- # Clean staging
113- rm -rf "$STAGING"
146+ rm -rf "$staging"
114147
115- # Verify zip was created
116- UNIVERSAL_ZIP="$RELEASE_DIR_ABS/Micmute-universal.zip"
117- if [ ! -f "$UNIVERSAL_ZIP" ]; then
118- echo "Universal zip not found at $UNIVERSAL_ZIP" >&2
119- exit 1
120- fi
148+ local zip_path="$RELEASE_DIR_ABS/Micmute-${label}.zip"
149+ if [ ! -f "$zip_path" ]; then
150+ echo "Zip not found at $zip_path" >&2
151+ exit 1
152+ fi
121153
122- # Move to workspace root
123- mv "$UNIVERSAL_ZIP" "$GITHUB_WORKSPACE"/
154+ mv "$zip_path" "$GITHUB_WORKSPACE"/
155+ }
156+
157+ package_variant arm64 arm64
158+ package_variant x86_64 intel
124159
125160 - name : Upload artifact
126161 uses : actions/upload-artifact@v4
127162 with :
128163 name : Micmute
129164 path : |
130- ${{ github.workspace }}/Micmute-universal.zip
165+ ${{ github.workspace }}/Micmute-arm64.zip
166+ ${{ github.workspace }}/Micmute-intel.zip
131167
132168 release :
133169 needs : build
@@ -154,32 +190,26 @@ jobs:
154190 fi
155191 echo "version=$VERSION" >> "$GITHUB_OUTPUT"
156192
157- - name : Rename artifact
193+ - name : Rename artifacts
158194 run : |
159- mv "Micmute-universal.zip" "Micmute-universal-${{ steps.appver.outputs.version }}-preview.zip"
195+ mv "Micmute-arm64.zip" "Micmute-arm64-${{ steps.appver.outputs.version }}-preview.zip"
196+ mv "Micmute-intel.zip" "Micmute-intel-${{ steps.appver.outputs.version }}-preview.zip"
160197
161198 - name : Create Release
162199 uses : softprops/action-gh-release@v2
163200 with :
164201 tag_name : preview
165202 name : ${{ steps.appver.outputs.version }}-preview
166203 files : |
167- Micmute-universal-${{ steps.appver.outputs.version }}-preview.zip
204+ Micmute-arm64-${{ steps.appver.outputs.version }}-preview.zip
205+ Micmute-intel-${{ steps.appver.outputs.version }}-preview.zip
168206 prerelease : true
169207 make_latest : false
170208 body : |
171- ## Micmute Preview Build
172-
173- **Version:** ${{ steps.appver.outputs.version }}
174-
175209 ### Installation Notes
176210 This is an unsigned build. You may need to:
177211 1. Right-click the app and select "Open" the first time
178212 2. Or remove quarantine in Terminal: `xattr -dr com.apple.quarantine /Applications/Micmute.app`
179213
180- ### Architecture Support
181- - ✅ Apple Silicon (M1/M2/M3/M4)
182- - ✅ Intel (x86_64)
183-
184214 env :
185215 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
0 commit comments