Build Worker Desktop Application #43
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: Build Worker Desktop Application | |
on: | |
workflow_dispatch: | |
inputs: | |
variant: | |
description: "Type of build" | |
type: choice | |
options: | |
- "development" | |
- "test" | |
- "demo" | |
- "main" | |
env: | |
VARIANT: ${{ inputs.variant }} | |
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }} | |
jobs: | |
release: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-latest, windows-latest] | |
steps: | |
- name: Check out karya-server repo to v5-dev | |
uses: actions/checkout@master | |
if: ${{ inputs.variant == 'development' }} | |
with: | |
repository: karya-inc/karya-server | |
token: ${{ secrets.KARYA_SERVER_TOKEN }} | |
ref: "v5-dev" | |
- name: Check out karya-server repo to v5-main | |
uses: actions/checkout@master | |
if: ${{ inputs.variant == 'main' || inputs.variant == 'demo' }} | |
with: | |
repository: karya-inc/karya-server | |
token: ${{ secrets.KARYA_SERVER_TOKEN }} | |
ref: "v5-main" | |
- name: Check out karya-server repo to v5-test | |
uses: actions/checkout@master | |
if: ${{ inputs.variant == 'test' }} | |
with: | |
repository: karya-inc/karya-server | |
token: ${{ secrets.KARYA_SERVER_TOKEN }} | |
ref: "v5-test" | |
- name: Setup Nodejs | |
uses: actions/setup-node@v2 | |
with: | |
node-version-file: "./server/.nvmrc" | |
cache: "npm" | |
cache-dependency-path: "**/*/package-lock.json" | |
- name: Log package.json | |
working-directory: ./server/worker-web | |
run: cat package.json | |
- name: Bootstrap monolith | |
working-directory: ./server | |
run: npm ci | |
- name: Build monolith | |
working-directory: ./server | |
run: npx lerna run build --scope=@karya/core --scope=@karya/parameter-specs | |
- name: Build/release Electron app | |
uses: samuelmeuli/action-electron-builder@v1 | |
with: | |
# GitHub token, automatically provided to the action | |
# (No need to define this secret in the repo settings) | |
github_token: ${{ github.token }} | |
# If the commit is tagged with a version (e.g. "v1.0.0"), | |
# release the app after building | |
release: true | |
package_root: "./server/worker-web/" |