Skip to content

Commit

Permalink
Merge pull request #862 from ebkr/ci-build
Browse files Browse the repository at this point in the history
Add GitHub Actions workflow for building the app
  • Loading branch information
MythicManiac authored Nov 9, 2022
2 parents bbb98b7 + 0ffd752 commit b6a739d
Showing 1 changed file with 61 additions and 0 deletions.
61 changes: 61 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
name: Build

on: [push]

jobs:
build:
name: Build for ${{ matrix.platform }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- kind: linux
os: ubuntu-latest
platform: linux
- kind: windows
os: windows-latest
platform: win
- kind: mac
os: macos-latest
platform: osx
steps:
- uses: actions/checkout@v3

- name: Set up Node
uses: actions/setup-node@v3
with:
# The talk on the street says this might be a good version for building.
node-version: 14.20.1
cache: yarn

- name: Install Yarn dependencies
run: yarn install --frozen-lockfile

- if: matrix.platform == 'linux'
name: Install bsdtar # Required by electron-builder when targeting pacman.
run: |
sudo apt-get update -y
sudo apt-get install -y libarchive-tools
- name: Build project
id: build
uses: StarUbiquitous/command-output@v1.0.1 # Store stdout/stderr to outputs.
# You might want to turn this on if there's problems with electron-builder.
# env:
# DEBUG: electron-builder
with:
run: yarn build-${{ matrix.platform }} --publish=never

- if: steps.build.outputs.stderr != ''
name: Log stderr
continue-on-error: true
run: echo '${{ steps.build.outputs.stderr }}'

# Creating Electron executables can in some cases fail with exit code 0.
# Check the output of build step for obvious signs of failure.
- if: contains(steps.build.outputs.stderr, '[FAIL]')
name: Check STDERR for trouble
uses: actions/github-script@v6
with:
script: core.setFailed('It seems the build process failed silently. See previous step for more info.')

0 comments on commit b6a739d

Please sign in to comment.