fix(release): ship the macOS DMG with an Applications link (#769)

#1286 added the drag-to-install Applications symlink to
packaging/build_macos_signed.sh, but official DMGs come from release.yml,
which still ran `hdiutil create -srcfolder OpenCADStudio.app`. That image
holds only the app, so the merge had no effect on the downloads #769 is
about.

Stage the app beside an /Applications symlink, as the signing script
does, and build the image from that folder. A new step mounts the result
and fails the job unless the app is present, `Applications` points at
/Applications, and the app's signature still verifies. Untagged runs
upload the DMG as a workflow artifact, as the snap job does, so the
layout can be checked without cutting a release.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Kevin GriffinandClaude Opus 5.5 committed 2026-10-12 19:45:52 -07:00
1 parent 77f19dafd0
commit f769b8750d
1 file changed
+26 -1
+26 -1
View File
@@ -517,15 +517,21 @@ jobs:
timeout-minutes: 2 timeout-minutes: 2
run: python3 docs/automation/mcp_handshake.py OpenCADStudio.app/Contents/MacOS/OpenCADStudio run: python3 docs/automation/mcp_handshake.py OpenCADStudio.app/Contents/MacOS/OpenCADStudio
# Stage the app beside an /Applications symlink so the mounted image
# offers drag-to-install (#769), matching packaging/build_macos_signed.sh.
- name: Create .dmg - name: Create .dmg
run: | run: |
rm -rf dmg-staging
mkdir dmg-staging
cp -R OpenCADStudio.app dmg-staging/
ln -s /Applications dmg-staging/Applications
set +e set +e
for attempt in 1 2 3 4 5; do for attempt in 1 2 3 4 5; do
hdiutil detach "/Volumes/Open CAD Studio" >/dev/null 2>&1 || true hdiutil detach "/Volumes/Open CAD Studio" >/dev/null 2>&1 || true
rm -f OpenCADStudio.dmg rm -f OpenCADStudio.dmg
hdiutil create \ hdiutil create \
-volname "Open CAD Studio" \ -volname "Open CAD Studio" \
-srcfolder OpenCADStudio.app \ -srcfolder dmg-staging \
-ov -format UDZO \ -ov -format UDZO \
OpenCADStudio.dmg && break OpenCADStudio.dmg && break
echo "hdiutil create failed (attempt $attempt) — retrying in 5s" echo "hdiutil create failed (attempt $attempt) — retrying in 5s"
@@ -533,6 +539,25 @@ jobs:
done done
set -e set -e
test -f OpenCADStudio.dmg test -f OpenCADStudio.dmg
rm -rf dmg-staging
- name: Verify .dmg layout
run: |
MNT=$(mktemp -d)
hdiutil attach -readonly -nobrowse -mountpoint "$MNT" OpenCADStudio.dmg
ls -la "$MNT"
test -d "$MNT/OpenCADStudio.app"
test "$(readlink "$MNT/Applications")" = /Applications
codesign --verify --deep --strict "$MNT/OpenCADStudio.app"
hdiutil detach "$MNT"
- name: Upload .dmg as workflow artifact
if: env.RELEASE_TAG == ''
uses: actions/upload-artifact@v4
with:
name: OpenCADStudio-macos-arm64-dmg
path: OpenCADStudio.dmg
if-no-files-found: error
- name: Upload .dmg to release - name: Upload .dmg to release
if: env.RELEASE_TAG != '' if: env.RELEASE_TAG != ''