diff --git a/.github/workflows/build-and-release-mac-arm.yml b/.github/workflows/build-and-release-mac-arm.yml new file mode 100644 index 0000000..a4938f7 --- /dev/null +++ b/.github/workflows/build-and-release-mac-arm.yml @@ -0,0 +1,49 @@ +name: Build and Deploy — Mac ARM +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-latest + + 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 diff --git a/.github/workflows/build-and-release-mac.yml b/.github/workflows/build-and-release-mac-x86.yml similarity index 91% rename from .github/workflows/build-and-release-mac.yml rename to .github/workflows/build-and-release-mac-x86.yml index 6655de4..a3dd8ba 100644 --- a/.github/workflows/build-and-release-mac.yml +++ b/.github/workflows/build-and-release-mac-x86.yml @@ -1,4 +1,4 @@ -name: Build and Deploy — Mac +name: Build and Deploy — Mac Intel run-name: ${{ github.actor }} is building a Mac release on: @@ -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 --x64 diff --git a/.github/workflows/test-build-mac-arm.yml b/.github/workflows/test-build-mac-arm.yml new file mode 100644 index 0000000..48e5907 --- /dev/null +++ b/.github/workflows/test-build-mac-arm.yml @@ -0,0 +1,36 @@ +name: Test build — Mac ARM +run-name: ${{ github.actor }} is building for MacOS. + +on: + pull_request: + branches: [ main ] + +jobs: + test-on-mac: + runs-on: macos-latest + + 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 \ No newline at end of file diff --git a/.github/workflows/test-build-mac.yml b/.github/workflows/test-build-mac-x86.yml similarity index 88% rename from .github/workflows/test-build-mac.yml rename to .github/workflows/test-build-mac-x86.yml index 7739a23..f804a8a 100644 --- a/.github/workflows/test-build-mac.yml +++ b/.github/workflows/test-build-mac-x86.yml @@ -1,4 +1,4 @@ -name: Test build — Mac +name: Test build — Mac Intel run-name: ${{ github.actor }} is building for MacOS. on: @@ -33,4 +33,4 @@ jobs: run: npm install - name: Build and deploy on Mac - run: npm run build:mac -- --publish=never \ No newline at end of file + run: npm run build:mac -- --publish=never --x64 \ No newline at end of file diff --git a/electron-builder.yml b/electron-builder.yml index 553d618..420fc26 100644 --- a/electron-builder.yml +++ b/electron-builder.yml @@ -1,4 +1,4 @@ -appId: com.gladstoneinstitutes.vame-desktop +appId: com.catalystneuro.vame-desktop productName: VAME Desktop directories: buildResources: resources @@ -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} diff --git a/package.json b/package.json index 1929429..ee56fea 100644 --- a/package.json +++ b/package.json @@ -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 , Nathan Vieira , Garrett Flynn ", diff --git a/resources/entitlements.mac.plist b/resources/entitlements.mac.plist index 38c887b..938c509 100644 --- a/resources/entitlements.mac.plist +++ b/resources/entitlements.mac.plist @@ -6,7 +6,9 @@ com.apple.security.cs.allow-unsigned-executable-memory - com.apple.security.cs.allow-dyld-environment-variables + com.apple.security.files.user-selected.read-write + + com.apple.security.files.user-selected.read-only