Skip to content

style: update ui

style: update ui #95

Workflow file for this run

name: Beta build
on:
push:
branches:
- beta
jobs:
build:
runs-on: macos-latest
strategy:
fail-fast: false
matrix:
arch: [arm64, x86_64]
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: Determine architecture label
id: arch_label
run: |
if [ "${{ matrix.arch }}" = "x86_64" ]; then
echo "label=intel" >> "$GITHUB_OUTPUT"
else
echo "label=arm64" >> "$GITHUB_OUTPUT"
fi
- name: Build ${{ matrix.arch }} variant
run: |
set -euo pipefail
PROJECT="Micmute.xcodeproj"
SCHEME="Micmute"
CONFIG="Release"
ARCH="${{ matrix.arch }}"
DERIVED="build_output/${ARCH}"
rm -rf "$DERIVED"
xcodebuild clean build \
-project "$PROJECT" \
-scheme "$SCHEME" \
-configuration "$CONFIG" \
-derivedDataPath "$DERIVED" \
-arch "$ARCH" \
CODE_SIGN_IDENTITY="" \
CODE_SIGNING_REQUIRED=NO \
CODE_SIGNING_ALLOWED=NO \
CODE_SIGN_ENTITLEMENTS=""
- name: Re-seal app bundle
run: |
set -euo pipefail
ARCH="${{ matrix.arch }}"
APP_PATH="build_output/${ARCH}/Build/Products/Release/Micmute.app"
if [ ! -d "$APP_PATH" ]; then
echo "App bundle not found at $APP_PATH" >&2
exit 1
fi
chmod +x "$APP_PATH/Contents/MacOS/Micmute" || true
xattr -cr "$APP_PATH" || true
codesign -f --deep -s - "$APP_PATH" || true
- name: Verify binary and bundle
run: |
set -euo pipefail
ARCH="${{ matrix.arch }}"
ARCH_LABEL="${{ steps.arch_label.outputs.label }}"
APP_PATH="build_output/${ARCH}/Build/Products/Release/Micmute.app"
echo "=== ${ARCH_LABEL} binary architecture check ==="
file "$APP_PATH/Contents/MacOS/Micmute"
otool -hv "$APP_PATH/Contents/MacOS/Micmute" || true
echo "=== ${ARCH_LABEL} bundle Info.plist check ==="
plutil -p "$APP_PATH/Contents/Info.plist" | egrep 'CFBundleExecutable|CFBundleIdentifier|LSMinimumSystemVersion' || true
echo "=== ${ARCH_LABEL} code signing verification ==="
codesign -vvv --deep --strict "$APP_PATH" || true
echo "=== ${ARCH_LABEL} Gatekeeper assessment ==="
spctl --assess --type execute -v "$APP_PATH" || 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"
ARCH="${{ matrix.arch }}"
ARCH_LABEL="${{ steps.arch_label.outputs.label }}"
SOURCE="build_output/${ARCH}/Build/Products/Release/Micmute.app"
STAGING="$RELEASE_DIR_ABS/staging-${ARCH_LABEL}"
rm -rf "$STAGING"
mkdir -p "$STAGING"
ditto "$SOURCE" "$STAGING/Micmute.app"
pushd "$STAGING" >/dev/null
ditto -c -k --sequesterRsrc --keepParent "Micmute.app" "$RELEASE_DIR_ABS/Micmute-${ARCH_LABEL}.zip"
popd >/dev/null
rm -rf "$STAGING"
ZIP_PATH="$RELEASE_DIR_ABS/Micmute-${ARCH_LABEL}.zip"
if [ ! -f "$ZIP_PATH" ]; then
echo "Zip not found at $ZIP_PATH" >&2
exit 1
fi
mv "$ZIP_PATH" "$GITHUB_WORKSPACE"/
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: Micmute-${{ steps.arch_label.outputs.label }}
path: ${{ github.workspace }}/Micmute-${{ steps.arch_label.outputs.label }}.zip
release:
needs: build
runs-on: macos-15
permissions:
contents: write
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Download artifacts
uses: actions/download-artifact@v4
with:
pattern: Micmute-*
path: .
merge-multiple: true
- 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 artifacts
run: |
VERSION="${{ steps.appver.outputs.version }}"
for zip in Micmute-*.zip; do
arch="${zip#Micmute-}"
arch="${arch%.zip}"
mv "$zip" "Micmute-${arch}-${VERSION}-preview.zip"
done
- name: Create Release
uses: softprops/action-gh-release@v2
with:
tag_name: preview
name: ${{ steps.appver.outputs.version }}-preview
files: |
Micmute-arm64-${{ steps.appver.outputs.version }}-preview.zip
Micmute-intel-${{ steps.appver.outputs.version }}-preview.zip
prerelease: true
make_latest: false
body: |
This is an unsigned build. You may need to:
- Right-click the app and select "Open" the first time
- Or remove quarantine in Terminal: `xattr -dr com.apple.quarantine /Applications/Micmute.app`
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}