Skip to content

Commit 1187791

Browse files
committed
feat: switch to DMG distribution with stapled notarization ticket
Replace tar.gz/zip with DMG for release distribution. DMG supports xcrun stapler staple, embedding the Apple notarization ticket directly in the disk image for offline Gatekeeper verification. Made-with: Cursor
1 parent a6b870c commit 1187791

1 file changed

Lines changed: 22 additions & 13 deletions

File tree

.github/workflows/build-turboquant-macos.yml

Lines changed: 22 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ jobs:
125125
--sign "$CODESIGN_IDENTITY" "$lib"
126126
done
127127
128-
- name: Prepare release archive
128+
- name: Prepare release contents
129129
run: |
130130
mkdir -p release/build/bin
131131
cp build/bin/llama-server release/build/bin/
@@ -134,25 +134,31 @@ jobs:
134134
cp build/bin/llama-perplexity release/build/bin/ 2>/dev/null || true
135135
find build -name "*.dylib" -exec cp {} release/build/bin/ \; 2>/dev/null || true
136136
find build -name "*.metal" -path "*/bin/*" -exec cp {} release/build/bin/ \; 2>/dev/null || true
137-
cd release
138-
zip -r ../llama-turboquant-macos-arm64.zip .
139-
tar -czf ../llama-turboquant-macos-arm64.tar.gz .
140-
cd ..
141-
ls -lh llama-turboquant-macos-arm64.zip llama-turboquant-macos-arm64.tar.gz
142137
143-
- name: Notarize release archive
138+
- name: Create DMG
139+
run: |
140+
hdiutil create -volname "LlamaTurboQuant" \
141+
-srcfolder release \
142+
-ov -format UDZO \
143+
llama-turboquant-macos-arm64.dmg
144+
ls -lh llama-turboquant-macos-arm64.dmg
145+
146+
- name: Notarize DMG
144147
env:
145148
APPLE_ID: ${{ secrets.APPLE_ID }}
146149
APPLE_ID_PASSWORD: ${{ secrets.APPLE_ID_PASSWORD }}
147150
APPLE_TEAM_ID: ${{ secrets.APPLE_TEAM_ID }}
148151
run: |
149-
echo "Submitting for notarization..."
150-
xcrun notarytool submit llama-turboquant-macos-arm64.zip \
152+
echo "Submitting DMG for notarization..."
153+
xcrun notarytool submit llama-turboquant-macos-arm64.dmg \
151154
--apple-id "$APPLE_ID" \
152155
--password "$APPLE_ID_PASSWORD" \
153156
--team-id "$APPLE_TEAM_ID" \
154157
--wait --timeout 10m
155-
echo "Notarization complete"
158+
echo "Stapling notarization ticket to DMG..."
159+
xcrun stapler staple llama-turboquant-macos-arm64.dmg
160+
echo "Verifying staple..."
161+
xcrun stapler validate llama-turboquant-macos-arm64.dmg
156162
157163
- name: Clean up keychain
158164
if: always()
@@ -184,15 +190,18 @@ jobs:
184190
185191
### Usage
186192
```bash
187-
tar -xzf llama-turboquant-macos-arm64.tar.gz
188-
./build/bin/llama-server -m model.gguf --cache-type-k turbo3 --cache-type-v turbo3
193+
# Mount the DMG, then copy binaries:
194+
hdiutil attach llama-turboquant-macos-arm64.dmg
195+
cp -R /Volumes/LlamaTurboQuant/build/bin/ ./llama-bin/
196+
hdiutil detach /Volumes/LlamaTurboQuant
197+
./llama-bin/llama-server -m model.gguf --cache-type-k turbo3 --cache-type-v turbo3
189198
```
190199
191200
### For Atomic Chat integration
192201
Replace the binary at:
193202
```
194203
~/Library/Application Support/Atomic Chat/data/llamacpp/backends/<version>/macos-arm64/build/bin/llama-server
195204
```
196-
files: llama-turboquant-macos-arm64.tar.gz
205+
files: llama-turboquant-macos-arm64.dmg
197206
draft: false
198207
prerelease: true

0 commit comments

Comments
 (0)