Skip to content

fix ci

fix ci #12

Workflow file for this run

name: App CI
on:
push:
tags: [ "v*", "desktop-v*" ]
jobs:
build-and-publish:
runs-on: ${{ matrix.os }}
strategy:
matrix:
# Do not use unbuntu-latest because it causes `The operation was canceled` failures:
# https://github.com/actions/runner-images/issues/6709
os: [macos-latest, ubuntu-latest, windows-latest]
steps:
- uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: '18.17.0'
# macos-latest ships with Python 3.12 by default, but this removes a
# utility that's used by electron-builder (distutils) so we need to pin
# Python to an earlier version.
# Fixes error `ModuleNotFoundError: No module named 'distutils'`
# Ref: https://github.com/nodejs/node-gyp/issues/2869
- uses: actions/setup-python@v4
with:
python-version: '3.11'
# setup web
- name: Install web dependencies
run: npm install
working-directory: ./web
- name: Build web
run: npm run build
working-directory: ./web
env:
NODE_ENV: production
# desktop app
- name: Install app dependencies
run: npm install
working-directory: ./apps
- name: Build app
run: npm run build
working-directory: ./apps
env:
NODE_ENV: production
ONEAUTH_SERVER_URL: ${{ secrets.ONEAUTH_SERVER_URL }}
ONEAUTH_APP_ID: ${{ secrets.ONEAUTH_APP_ID }}
NODE_OPTIONS: "--max_old_space_size=4096"
- name: Publish app
if: matrix.os != 'macos-latest'
run: npm run publish:desktop
working-directory: ./apps
env:
NODE_ENV: production
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
- name: Publish app - MacOS
if: matrix.os == 'macos-latest'
run: npm run publish:desktop:macos
working-directory: ./apps
env:
NODE_ENV: production
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
NODE_OPTIONS: "--max_old_space_size=4096"