name: build-checks on: push: pull_request: jobs: build-web: strategy: matrix: os: [ macos, ubuntu, windows ] mode: [ # Vite mode: https://vitejs.dev/guide/env-and-mode.html development, # Used by `dev` command production, # Used by `build` command # Vitest mode: https://vitest.dev/guide/cli.html test, # Used by Vitest ] fail-fast: false # Allows to see results from other combinations runs-on: ${{ matrix.os }}-latest steps: - name: Checkout uses: actions/checkout@v2 - name: Setup node uses: ./.github/actions/setup-node - name: Install dependencies run: npm ci - name: Build run: npm run build -- --mode ${{ matrix.mode }} # A new job is used due to environments/modes different from Vue CLI, https://github.com/nklayman/vue-cli-plugin-electron-builder/issues/1626 build-desktop: strategy: matrix: os: [ macos, ubuntu, windows ] mode: [ development, production ] # "test" is not supported https://github.com/nklayman/vue-cli-plugin-electron-builder/issues/1627 fail-fast: false # Allows to see results from other combinations runs-on: ${{ matrix.os }}-latest steps: - name: Checkout uses: actions/checkout@v2 - name: Setup node uses: ./.github/actions/setup-node - name: Install dependencies run: npm ci - name: Install cross-env # Used to set NODE_ENV due to https://github.com/nklayman/vue-cli-plugin-electron-builder/issues/1626 run: npm install --global cross-env - name: Build run: |- cross-env-shell NODE_ENV=${{ matrix.mode }} npm run electron:build -- --publish never --mode ${{ matrix.mode }} create-icons: strategy: matrix: os: [ macos, ubuntu, windows ] fail-fast: false # Allows to see results from other combinations runs-on: ${{ matrix.os }}-latest steps: - name: Checkout uses: actions/checkout@v2 - name: Setup node uses: ./.github/actions/setup-node - name: Install dependencies run: npm ci - name: Create icons run: npm run icons:build