Skip to content

Commit

Permalink
publish .dmg
Browse files Browse the repository at this point in the history
  • Loading branch information
mrmizz committed Feb 28, 2025
1 parent 2f35d66 commit f87bc0d
Showing 1 changed file with 56 additions and 0 deletions.
56 changes: 56 additions & 0 deletions .github/workflows/build-macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -167,3 +167,59 @@ jobs:
echo "Download macOS artifact for $OUT_ARCH at:"
echo "https://${{ env.S3_BUCKET_NAME }}.s3.amazonaws.com/${{ env.TARGET }}/${{ env.ARCH }}/${{ env.VERSION }}/ore_${{ env.VERSION }}_${OUT_ARCH}.app.tar.gz"
# 14) Create a DMG from the notarized .app
- name: Create DMG
run: |
DMG_FILE="ORE_${{ env.VERSION }}.dmg"
# Make a DMG containing the .app
# You might want to customize volume name, background, etc.
hdiutil create -volname "OreAppInstaller" \
-srcfolder "${{ env.APP_DIR }}" \
-ov "$DMG_FILE"
# 15) (Optional) Code-sign the DMG itself
# This step is recommended, but not strictly required if you plan to notarize it anyway.
- name: Code-sign DMG
run: |
codesign --force --sign "Developer ID Application: $DEVID_NAME ($DEVID_TEAM_ID)" --verbose \
"ORE_${{ env.VERSION }}.dmg"
env:
DEVID_NAME: ${{ secrets.DEVID_NAME }}
DEVID_TEAM_ID: ${{ secrets.DEVID_TEAM_ID }}

# 16) Notarize the DMG
- name: Notarize DMG
run: |
DMG_FILE="ORE_${{ env.VERSION }}.dmg"
xcrun notarytool submit "$DMG_FILE" \
--apple-id "$NOTARIZE_APPLE_ID" \
--team-id "$DEVID_TEAM_ID" \
--password "$NOTARIZE_APP_PASSWORD" \
--verbose \
--wait
# Staple the DMG with the notarization ticket
xcrun stapler staple "$DMG_FILE"
env:
NOTARIZE_APPLE_ID: ${{ secrets.NOTARIZE_APPLE_ID }}
NOTARIZE_APP_PASSWORD: ${{ secrets.NOTARIZE_APP_PASSWORD }}
DEVID_TEAM_ID: ${{ secrets.DEVID_TEAM_ID }}

# 17) Upload the DMG to S3 for new users
- name: Upload DMG to S3
run: |
# e.g., rename or keep as-is
DMG_FILE="ORE_${{ env.VERSION }}.dmg"
if [ "${{ env.ARCH }}" = "x86_64" ]; then
OUT_ARCH="x64"
else
OUT_ARCH="aarch64"
fi
aws s3 cp "$DMG_FILE" "s3://${{ env.S3_BUCKET_NAME }}/${{ env.TARGET }}/${{ env.ARCH }}/${{ env.VERSION }}/ore_${{ env.VERSION }}_${OUT_ARCH}.dmg"
echo "DMG upload complete."

0 comments on commit f87bc0d

Please sign in to comment.