-
Notifications
You must be signed in to change notification settings - Fork 210
72 lines (68 loc) · 2.26 KB
/
build.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
# This is a basic workflow to help you get started with Actions
name: CI
# Controls when the action will run. Triggers the workflow on push or pull request
# events but only for the master branch
on:
push:
branches:
- feature/githubActionsBuild
- master
- development
release:
types: [created]
jobs:
build:
defaults:
run:
working-directory:
AhMyth-Server
runs-on: ubuntu-latest
steps:
- name: Cache node_modules
uses: actions/cache@v2
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: Cache Electron
uses: actions/cache@v1
with:
path: ${{ github.workspace }}/.cache/electron
key: ${{ runner.os }}-electron-cache-${{ hashFiles(format('{0}{1}', github.workspace, '/package-lock.json')) }}
restore-keys: |
${{ runner.os }}-electron-cache-
- name: Cache Electron-Builder
uses: actions/cache@v1
with:
path: ${{ github.workspace }}/.cache/electron-builder
key: ${{ runner.os }}-electron-builder-cache-${{ hashFiles(format('{0}{1}', github.workspace, '/package-lock.json')) }}
restore-keys: |
${{ runner.os }}-electron-builder-cache-
- uses: actions/checkout@v2
- name: Install deps
run: |
sudo dpkg --add-architecture i386
sudo apt-get update
sudo apt-get install --no-install-recommends -y wine32 wine64 gcc-multilib g++-multilib
- uses: actions/checkout@v2
- name: Setup Node.js environment
uses: actions/[email protected]
with:
node-version: 10.x
- name: Install dependencies
run: |
npm i
- name: Build Linux app (32 bit)
run: npm run build:linux32
- name: Build Linux app (64 bit)
run: npm run build:linux64
- name: Build Windows App (32 bit)
run: npm run build:win32
- name: Build Windows App (64 bit)
run: npm run build:win64
- name: Upload - push to artifact files
uses: actions/upload-artifact@v1
with:
name: AhMyth
path: ./AhMyth-Server/dist/