Skip to content

Build macOS

Build macOS #24

Workflow file for this run

name: Build macOS
on:
workflow_dispatch:
jobs:
release:
permissions: write-all
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macos-latest]
node-version: [14.x]
env:
ELECTRON_CACHE: ${{ github.workspace }}/.cache/electron
ELECTRON_BUILDER_CACHE: ${{ github.workspace }}/.cache/electron-builder
ADS_URLS: ${{ secrets.ADS_URLS }}
VK_APP_ID: ${{ secrets.VK_APP_ID }}
SENTRY_DSN: ${{ secrets.SENTRY_DSN }}
API_ENDPOINT_URL: ${{ secrets.API_ENDPOINT_URL }}
YANDEX_TRACKING_ID: ${{ secrets.YANDEX_TRACKING_ID }}
STATIC_ENDPOINT_URL: ${{ secrets.STATIC_ENDPOINT_URL }}
DISCORD_CLIENT_ID: ${{ secrets.DISCORD_CLIENT_ID }}
EXT_API_SERVER: ${{ secrets.EXT_API_SERVER }}
PYTHON: python3.10
NODE_GYP_FORCE_PYTHON: python3.10
steps:
- name: Check out Git repository
uses: actions/checkout@v1
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: Get yarn cache
id: yarn-cache
run: echo "::set-output name=dir::$(yarn cache dir)"
- name: Cache Node.js modules
uses: actions/cache@v1
with:
path: ${{ steps.yarn-cache.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles(format('{0}{1}', github.workspace, '/yarn.lock')) }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Cache Electron
uses: actions/cache@v1
with:
path: ${{ github.workspace }}/.cache/electron
key: ${{ runner.os }}-electron-cache-${{ hashFiles(format('{0}{1}', github.workspace, '/yarn.lock')) }}
restore-keys: |
${{ runner.os }}-electron-cache-
- name: Cache Electron-Builder
uses: actions/cache@v1
with:
path: ${{ github.workspace }}/.cache/electron-builder
key: ${{ runner.os }}-electron-builder-cache-${{ hashFiles(format('{0}{1}', github.workspace, '/yarn.lock')) }}
restore-keys: |
${{ runner.os }}-electron-builder-cache-
- name: Remove other python
run: sudo rm -rf /System/Library/Frameworks/Python.framework/
- name: Install [email protected]
run: brew install [email protected]
- name: Install dependencies
run: yarn
- name: Run build
run: npm run release:mac
- name: Archive results
uses: actions/upload-artifact@v3
with:
name: Save artifacts
path: release/*.dmg