rly is building a MAC release for NWB GUIDE #16
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Mac Release | |
run-name: ${{ github.actor }} is building a MAC release for NWB GUIDE | |
# NOTE: even though the runner is an x64 mac, both x64 and arm64 releases will be made | |
on: | |
workflow_dispatch: | |
jobs: | |
deploy-on-mac: | |
runs-on: macos-13 | |
# NOTE: macos-latest is an arm64 mac, and the dependency sonpy (Spike2RecordingInterface) has a .so file that | |
# works only on mac x64. This causes issues building and deploying on mac arm64. So we use macos-13 (x64) | |
# to build and deploy both the x64 and arm64 versions of the app. | |
# NOTE: if changing this to macos-latest, make sure to use the apple-silicon conda environment. | |
defaults: | |
run: | |
shell: bash -l {0} | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: "3.10" | |
- name: Setup Mambaforge | |
uses: conda-incubator/setup-miniconda@v3 | |
with: | |
miniforge-variant: Mambaforge | |
miniforge-version: latest | |
activate-environment: nwb-guide | |
use-mamba: true | |
- name: Create and activate environment | |
run: mamba env update --name nwb-guide --file environments/environment-MAC-intel.yml | |
- name: Use Node.js 20 | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
- name: Install package.json modules and their dependencies (not via `npm ci`) | |
run: npm install --verbose | |
- name: Remove bad sonpy file (might make Spike2 format unusable on Mac - should exclude from selection) | |
run: rm -f "$CONDA_PREFIX/lib/python3.9/site-packages/sonpy/linux/sonpy.so" | |
- uses: apple-actions/import-codesign-certs@v2 | |
with: | |
# Currently this is set to Ryan's Developer ID certificate | |
p12-file-base64: ${{ secrets.MACOS_CERTIFICATE }} | |
p12-password: ${{ secrets.MACOS_CERTIFICATE_PWD }} | |
- name: Build and deploy on MAC | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
# Currently this is set to Ryan's Apple ID and app-specific password | |
teamId: ${{ secrets.APPLE_TEAM_ID }} | |
appleId: ${{ secrets.APPLE_ID }} | |
appleIdPassword: ${{ secrets.APPLE_PASSWORD }} | |
# uncomment below to make build process extra verbose in case of failure | |
# DEBUG: electron-builder | |
# DEBUG_DMG: true | |
run: npm run deploy:mac |