From b74541c23266e01fb42add9eb00abfb04228edc7 Mon Sep 17 00:00:00 2001 From: RobertGemmaJr Date: Fri, 1 Mar 2024 12:07:25 -0500 Subject: [PATCH] feat: Package universal binaries for the mac build --- .github/workflows/release.yml | 13 +++++-------- package.json | 2 +- 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index bea64a92e..506469dfb 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -4,14 +4,12 @@ name: 🚀 Release # Note that this runs for both releases and pre-releases: https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#release on: release: - # TODO @brown-ccv: I need to figure out which ones to do here? - # TODO @brown-ccv: Should occur whenever a release is created or edited, prelease or otherwise - # types: created - types: [created, edited] + types: created concurrency: group: ${{ github.workflow }}-${{ github.ref }} cancel-in-progress: true + permissions: contents: write @@ -61,8 +59,7 @@ jobs: run: npm run package:windows - name: 📦 Package app installer - Mac if: startsWith(matrix.os, 'mac') - # TODO @brown-ccv #318: Universal may not work between Intel and Apple Silicon? - # TODO @brown-ccv #318: Will have to run seperate makes for `arm64` and `x64` + # TODO @brown-ccv #318: Universal opening with Rosetta? run: npm run package:mac - name: 📦 Package app installer - Linux if: startsWith(matrix.os, 'ubuntu') @@ -89,8 +86,8 @@ jobs: if: startsWith(matrix.os, 'mac') uses: svenstaro/upload-release-action@v2 with: - file: out/make/${{ steps.package_info.outputs.name }}-${{ steps.package_info.outputs.version }}-x64.dmg - asset_name: ${{ steps.package_info.outputs.name }}-${{ steps.package_info.outputs.version }}-${{ matrix.setting }}-x64.dmg + file: out/make/${{ steps.package_info.outputs.name }}-${{ steps.package_info.outputs.version }}-universal.dmg + asset_name: ${{ steps.package_info.outputs.name }}-${{ steps.package_info.outputs.version }}-${{ matrix.setting }}-universal.dmg tag: ${{ github.ref }} repo_token: ${{ secrets.GITHUB_TOKEN }} - name: ⬆ Upload installer to release - Linux diff --git a/package.json b/package.json index 6e42f4df8..bf57b05cd 100644 --- a/package.json +++ b/package.json @@ -89,7 +89,7 @@ "package": "npm run build && electron-forge make", "package:windows": "npm run package -- --arch x64 --targets @electron-forge/maker-squirrel", "package:linux": "npm run package -- --arch x64 --targets @electron-forge/maker-deb", - "package:mac": "npm run package -- --arch x64 --targets @electron-forge/maker-dmg", + "package:mac": "npm run package -- --arch universal --targets @electron-forge/maker-dmg", "cli": "node cli.mjs", "commit": "git-cz", "format": "prettier --write .",