Skip to content

build: update

build: update #85

Workflow file for this run

name: Beta build
on:
push:
branches:
- beta
jobs:
build:
runs-on: macos-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup Swift
uses: swift-actions/setup-swift@v2
with:
swift-version: '6.1'
- name: Install CocoaPods
run: |
brew install cocoapods || true
- name: Build universal with Xcode
run: |
set -euo pipefail
PROJECT="Micmute.xcodeproj"
SCHEME="Micmute"
CONFIG="Release"
DERIVED="build_output/universal"
# Clean previous builds
rm -rf "$DERIVED"
# Build universal binary directly with Xcode
xcodebuild clean build \
-project "$PROJECT" \
-scheme "$SCHEME" \
-configuration "$CONFIG" \
-derivedDataPath "$DERIVED" \
-arch arm64 \
-arch x86_64 \
CODE_SIGN_IDENTITY="" \
CODE_SIGNING_REQUIRED=NO \
CODE_SIGNING_ALLOWED=NO \
CODE_SIGN_ENTITLEMENTS=""
- name: Verify and re-seal app bundle
run: |
set -euo pipefail
APP="build_output/universal/Build/Products/Release/Micmute.app"
# Verify the app exists
if [ ! -d "$APP" ]; then
echo "App bundle not found at $APP" >&2
exit 1
fi
# Ensure executable bits are set
chmod +x "$APP/Contents/MacOS/Micmute" || true
# Clear extended attributes that might cause issues
xattr -cr "$APP" || true
# Re-codesign entire bundle ad-hoc for macOS 15 compatibility
codesign -f --deep -s - "$APP" || true
- name: Verify binary and bundle
run: |
set -euo pipefail
APP="build_output/universal/Build/Products/Release/Micmute.app"
echo "=== Binary architecture check ==="
file "$APP/Contents/MacOS/Micmute"
otool -hv "$APP/Contents/MacOS/Micmute" || true
echo "=== Bundle Info.plist check ==="
plutil -p "$APP/Contents/Info.plist" | egrep 'CFBundleExecutable|CFBundleIdentifier|LSMinimumSystemVersion' || true
echo "=== Code signing verification ==="
codesign -vvv --deep --strict "$APP" || true
echo "=== Gatekeeper assessment ==="
spctl --assess --type execute -v "$APP" || true
- name: Prepare release bundle
run: |
set -euo pipefail
RELEASE_DIR="build_output/Bundle"
RELEASE_DIR_ABS="$(pwd)/$RELEASE_DIR"
mkdir -p "$RELEASE_DIR_ABS"
APP_SOURCE="build_output/universal/Build/Products/Release/Micmute.app"
STAGING="$RELEASE_DIR_ABS/staging-universal"
# Clean staging area
rm -rf "$STAGING"
mkdir -p "$STAGING"
# Copy app to staging
ditto "$APP_SOURCE" "$STAGING/Micmute.app"
# Create zip from staging
pushd "$STAGING" >/dev/null
ditto -c -k --sequesterRsrc --keepParent "Micmute.app" "$RELEASE_DIR_ABS/Micmute-universal.zip"
popd >/dev/null
# Clean staging
rm -rf "$STAGING"
# Verify zip was created
UNIVERSAL_ZIP="$RELEASE_DIR_ABS/Micmute-universal.zip"
if [ ! -f "$UNIVERSAL_ZIP" ]; then
echo "Universal zip not found at $UNIVERSAL_ZIP" >&2
exit 1
fi
# Move to workspace root
mv "$UNIVERSAL_ZIP" "$GITHUB_WORKSPACE"/
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: Micmute
path: |
${{ github.workspace }}/Micmute-universal.zip
release:
needs: build
runs-on: macos-15
permissions:
contents: write
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Download artifact
uses: actions/download-artifact@v4
with:
name: Micmute
path: .
- name: Read app version from Xcode settings
id: appver
run: |
VERSION=$(xcodebuild -project Micmute.xcodeproj -scheme Micmute -showBuildSettings | awk -F= '/MARKETING_VERSION/ {gsub(/ /,"",$2); print $2; exit}')
if [ -z "$VERSION" ]; then
echo "MARKETING_VERSION not found. Ensure it's set in target Build Settings." >&2
exit 1
fi
echo "version=$VERSION" >> "$GITHUB_OUTPUT"
- name: Rename artifact
run: |
mv "Micmute-universal.zip" "Micmute-universal-${{ steps.appver.outputs.version }}-preview.zip"
- name: Create Release
uses: softprops/action-gh-release@v2
with:
tag_name: preview
name: ${{ steps.appver.outputs.version }}-preview
files: |
Micmute-universal-${{ steps.appver.outputs.version }}-preview.zip
prerelease: true
make_latest: false
body: |
## Micmute Preview Build
**Version:** ${{ steps.appver.outputs.version }}
### Installation Notes
This is an unsigned build. You may need to:
1. Right-click the app and select "Open" the first time
2. Or remove quarantine in Terminal: `xattr -dr com.apple.quarantine /Applications/Micmute.app`
### Architecture Support
- ✅ Apple Silicon (M1/M2/M3/M4)
- ✅ Intel (x86_64)
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}