Skip to content

Commit

Permalink
feature: use arm and x86 for macos
Browse files Browse the repository at this point in the history
  • Loading branch information
nathan-vm committed Aug 1, 2024
1 parent 5904e40 commit 2d38c42
Show file tree
Hide file tree
Showing 7 changed files with 92 additions and 5 deletions.
49 changes: 49 additions & 0 deletions .github/workflows/build-and-release-mac-arm.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: Build and Deploy — Mac
run-name: ${{ github.actor }} is building a Mac release

on:
push:
branches:
- main

permissions:
actions: write
contents: write
packages: write

jobs:
deploy-on-mac:
runs-on: macos-14-arm

defaults:
run:
shell: bash -l {0}

steps:
- uses: actions/checkout@v4

- uses: actions/setup-python@v5
with:
python-version: "3.11"

- name: install python dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- uses: actions/setup-node@v4
with:
node-version: "20"

- name: Install dependencies
run: npm install

- uses: apple-actions/import-codesign-certs@v3
with:
p12-file-base64: ${{ secrets.MACOS_CERTIFICATE }}
p12-password: ${{ secrets.MAOS_CERTIFICATE_PWD }}

- name: Build and deploy on MacOS
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: npm run build:mac -- --publish=always --arm64
Original file line number Diff line number Diff line change
Expand Up @@ -46,4 +46,4 @@ jobs:
- name: Build and deploy on MacOS
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: npm run build:mac -- --publish=always
run: npm run build:mac -- --publish=always --universal
36 changes: 36 additions & 0 deletions .github/workflows/test-build-mac-arm.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Test build — Mac
run-name: ${{ github.actor }} is building for MacOS.

on:
pull_request:
branches: [ main ]

jobs:
test-on-mac:
runs-on: macos-14-arm

defaults:
run:
shell: bash -l {0}

steps:
- uses: actions/checkout@v4

- uses: actions/setup-python@v5
with:
python-version: "3.11"

- name: install python dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- uses: actions/setup-node@v4
with:
node-version: "20"

- name: Install dependencies
run: npm install

- name: Build and deploy on Mac
run: npm run build:mac -- --publish=never --arm64
File renamed without changes.
4 changes: 2 additions & 2 deletions electron-builder.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
appId: com.gladstoneinstitutes.vame-desktop
appId: com.catalystneuro.vame-desktop
productName: VAME Desktop
directories:
buildResources: resources
Expand Down Expand Up @@ -32,7 +32,7 @@ mac:
- NSDownloadsFolderUsageDescription: Application requests access to the user's Downloads folder.
notarize: false
dmg:
artifactName: ${name}-${version}-macos.${ext}
artifactName: ${name}-${version}-macos-${arch}.${ext}
writeUpdateInfo: false
linux:
artifactName: ${name}-${version}-linux.${ext}
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "vame-desktop",
"main": "./out/main/index.js",
"version": "0.3.1",
"version": "0.3.2",
"description": "An open-source machine learning tool for behavioral segmentation and analyses.",
"license": "GPL-3.0-only",
"author": "Catalyst Neuro <hello@catalystneuro.com>, Nathan Vieira <nathan.v.marcelino@gmail.com>, Garrett Flynn <garrettmflynn@gmail.com>",
Expand Down
4 changes: 3 additions & 1 deletion resources/entitlements.mac.plist
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@
<true/>
<key>com.apple.security.cs.allow-unsigned-executable-memory</key>
<true/>
<key>com.apple.security.cs.allow-dyld-environment-variables</key>
<key>com.apple.security.files.user-selected.read-write</key>
<true/>
<key>com.apple.security.files.user-selected.read-only</key>
<true/>
</dict>
</plist>

0 comments on commit 2d38c42

Please sign in to comment.