Skip to content

Commit 420ea7b

Browse files
ion05claude
andcommitted
Add app icon, DMG installer background, and release CI
Fills the empty AppIcon slot with a native-feeling squircle icon (system blue, speaker/soundwave glyph, matching the menu-bar extra), enables hardened runtime for Release builds so they can be notarized, and adds a GitHub Actions workflow that archives, signs, notarizes, and packages a release DMG on tag push. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01G5Re8fx9VbhVEpDeFa9JAq
1 parent 9478fb9 commit 420ea7b

16 files changed

Lines changed: 253 additions & 1 deletion

‎.github/workflows/release.yml‎

Lines changed: 116 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,116 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
tags:
6+
- "v*.*.*"
7+
8+
jobs:
9+
build:
10+
runs-on: macos-15
11+
steps:
12+
- uses: actions/checkout@v4
13+
14+
- name: Select Xcode 26
15+
run: sudo xcode-select -s /Applications/Xcode_26.0.app/Contents/Developer
16+
17+
- name: Import Developer ID certificate
18+
env:
19+
BUILD_CERTIFICATE_BASE64: ${{ secrets.BUILD_CERTIFICATE_BASE64 }}
20+
P12_PASSWORD: ${{ secrets.P12_PASSWORD }}
21+
KEYCHAIN_PASSWORD: ${{ secrets.KEYCHAIN_PASSWORD }}
22+
run: |
23+
set -euo pipefail
24+
CERT_PATH="$RUNNER_TEMP/cert.p12"
25+
KEYCHAIN_PATH="$RUNNER_TEMP/signing.keychain-db"
26+
27+
echo -n "$BUILD_CERTIFICATE_BASE64" | base64 --decode -o "$CERT_PATH"
28+
29+
security create-keychain -p "$KEYCHAIN_PASSWORD" "$KEYCHAIN_PATH"
30+
security set-keychain-settings -lut 21600 "$KEYCHAIN_PATH"
31+
security unlock-keychain -p "$KEYCHAIN_PASSWORD" "$KEYCHAIN_PATH"
32+
security import "$CERT_PATH" -P "$P12_PASSWORD" -A -t cert -f pkcs12 -k "$KEYCHAIN_PATH"
33+
security set-key-partition-list -S apple-tool:,apple:,codesign: -s -k "$KEYCHAIN_PASSWORD" "$KEYCHAIN_PATH"
34+
security list-keychain -d user -s "$KEYCHAIN_PATH" login.keychain
35+
36+
- name: Derive version from tag
37+
id: version
38+
run: |
39+
tag="${GITHUB_REF#refs/tags/v}"
40+
echo "version=$tag" >> "$GITHUB_OUTPUT"
41+
42+
- name: Archive
43+
run: |
44+
xcodebuild archive \
45+
-project Mix.xcodeproj \
46+
-scheme Mix \
47+
-configuration Release \
48+
-archivePath "$RUNNER_TEMP/Mix.xcarchive" \
49+
-destination "generic/platform=macOS" \
50+
DEVELOPMENT_TEAM="${{ secrets.APPLE_TEAM_ID }}" \
51+
CODE_SIGN_STYLE=Manual \
52+
CODE_SIGN_IDENTITY="Developer ID Application" \
53+
MARKETING_VERSION="${{ steps.version.outputs.version }}" \
54+
CURRENT_PROJECT_VERSION="${{ github.run_number }}"
55+
56+
- name: Export signed app
57+
run: |
58+
cat > "$RUNNER_TEMP/ExportOptions.plist" <<PLIST
59+
<?xml version="1.0" encoding="UTF-8"?>
60+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
61+
<plist version="1.0">
62+
<dict>
63+
<key>method</key><string>developer-id</string>
64+
<key>teamID</key><string>${{ secrets.APPLE_TEAM_ID }}</string>
65+
<key>signingStyle</key><string>manual</string>
66+
</dict>
67+
</plist>
68+
PLIST
69+
70+
xcodebuild -exportArchive \
71+
-archivePath "$RUNNER_TEMP/Mix.xcarchive" \
72+
-exportPath "$RUNNER_TEMP/export" \
73+
-exportOptionsPlist "$RUNNER_TEMP/ExportOptions.plist"
74+
75+
- name: Notarize
76+
env:
77+
NOTARIZE_APPLE_ID: ${{ secrets.NOTARIZE_APPLE_ID }}
78+
NOTARIZE_PASSWORD: ${{ secrets.NOTARIZE_PASSWORD }}
79+
APPLE_TEAM_ID: ${{ secrets.APPLE_TEAM_ID }}
80+
run: |
81+
set -euo pipefail
82+
ditto -c -k --keepParent "$RUNNER_TEMP/export/Mix.app" "$RUNNER_TEMP/Mix-notarize.zip"
83+
84+
xcrun notarytool submit "$RUNNER_TEMP/Mix-notarize.zip" \
85+
--apple-id "$NOTARIZE_APPLE_ID" \
86+
--password "$NOTARIZE_PASSWORD" \
87+
--team-id "$APPLE_TEAM_ID" \
88+
--wait
89+
90+
xcrun stapler staple "$RUNNER_TEMP/export/Mix.app"
91+
92+
- name: Package DMG
93+
run: |
94+
set -euo pipefail
95+
version="${{ steps.version.outputs.version }}"
96+
dmg_dir="$RUNNER_TEMP/dmg"
97+
mkdir -p "$dmg_dir"
98+
cp -R "$RUNNER_TEMP/export/Mix.app" "$dmg_dir/"
99+
ln -s /Applications "$dmg_dir/Applications"
100+
hdiutil create -volname "Mix" -srcfolder "$dmg_dir" -ov -format UDZO "$RUNNER_TEMP/Mix-$version.dmg"
101+
echo "DMG_PATH=$RUNNER_TEMP/Mix-$version.dmg" >> "$GITHUB_ENV"
102+
103+
- name: Verify notarization ticket
104+
run: spctl -a -t open --context context:primary-signing-identifier -v "$RUNNER_TEMP/export/Mix.app"
105+
106+
- name: Clean up keychain
107+
if: always()
108+
run: security delete-keychain "$RUNNER_TEMP/signing.keychain-db" || true
109+
110+
- name: Create GitHub release
111+
uses: softprops/action-gh-release@v2
112+
with:
113+
files: ${{ env.DMG_PATH }}
114+
generate_release_notes: true
115+
env:
116+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

‎Mix.xcodeproj/project.pbxproj‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,7 @@
243243
CODE_SIGN_STYLE = Automatic;
244244
COMBINE_HIDPI_IMAGES = YES;
245245
CURRENT_PROJECT_VERSION = 1;
246-
ENABLE_HARDENED_RUNTIME = NO;
246+
ENABLE_HARDENED_RUNTIME = YES;
247247
GENERATE_INFOPLIST_FILE = NO;
248248
INFOPLIST_FILE = Mix/Info.plist;
249249
LD_RUNPATH_SEARCH_PATHS = "@executable_path/../Frameworks";

‎Mix/Assets.xcassets/AppIcon.appiconset/Contents.json‎

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,51 +1,61 @@
11
{
22
"images" : [
33
{
4+
"filename" : "icon_16x16.png",
45
"idiom" : "mac",
56
"scale" : "1x",
67
"size" : "16x16"
78
},
89
{
10+
"filename" : "icon_16x16@2x.png",
911
"idiom" : "mac",
1012
"scale" : "2x",
1113
"size" : "16x16"
1214
},
1315
{
16+
"filename" : "icon_32x32.png",
1417
"idiom" : "mac",
1518
"scale" : "1x",
1619
"size" : "32x32"
1720
},
1821
{
22+
"filename" : "icon_32x32@2x.png",
1923
"idiom" : "mac",
2024
"scale" : "2x",
2125
"size" : "32x32"
2226
},
2327
{
28+
"filename" : "icon_128x128.png",
2429
"idiom" : "mac",
2530
"scale" : "1x",
2631
"size" : "128x128"
2732
},
2833
{
34+
"filename" : "icon_128x128@2x.png",
2935
"idiom" : "mac",
3036
"scale" : "2x",
3137
"size" : "128x128"
3238
},
3339
{
40+
"filename" : "icon_256x256.png",
3441
"idiom" : "mac",
3542
"scale" : "1x",
3643
"size" : "256x256"
3744
},
3845
{
46+
"filename" : "icon_256x256@2x.png",
3947
"idiom" : "mac",
4048
"scale" : "2x",
4149
"size" : "256x256"
4250
},
4351
{
52+
"filename" : "icon_512x512.png",
4453
"idiom" : "mac",
4554
"scale" : "1x",
4655
"size" : "512x512"
4756
},
4857
{
58+
"filename" : "icon_512x512@2x.png",
4959
"idiom" : "mac",
5060
"scale" : "2x",
5161
"size" : "512x512"
12.1 KB
Loading
32.6 KB
Loading
647 Bytes
Loading
1.53 KB
Loading
32.6 KB
Loading
83.4 KB
Loading
1.53 KB
Loading

0 commit comments

Comments
 (0)