-
Notifications
You must be signed in to change notification settings - Fork 0
84 lines (70 loc) · 2.37 KB
/
build-release.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
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, macos-11]
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: Install python deps
run: python3 -m pip install packaging
- 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/"