Skip to content

Commit 0bd1758

Browse files
authored
Merge pull request AhMyth#231 from zlocate/feature/githubActionsBuild
Added base Github Actions scenario to build apps
2 parents 1013d09 + 9676b25 commit 0bd1758

File tree

1 file changed

+72
-0
lines changed

1 file changed

+72
-0
lines changed

.github/workflows/build.yml

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
2+
# This is a basic workflow to help you get started with Actions
3+
4+
name: CI
5+
6+
# Controls when the action will run. Triggers the workflow on push or pull request
7+
# events but only for the master branch
8+
on:
9+
push:
10+
branches:
11+
- feature/githubActionsBuild
12+
- master
13+
- development
14+
release:
15+
types: [created]
16+
jobs:
17+
build:
18+
defaults:
19+
run:
20+
working-directory:
21+
AhMyth-Server
22+
runs-on: ubuntu-latest
23+
steps:
24+
- name: Cache node_modules
25+
uses: actions/cache@v2
26+
with:
27+
path: ~/.npm
28+
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
29+
restore-keys: |
30+
${{ runner.os }}-node-
31+
- name: Cache Electron
32+
uses: actions/cache@v1
33+
with:
34+
path: ${{ github.workspace }}/.cache/electron
35+
key: ${{ runner.os }}-electron-cache-${{ hashFiles(format('{0}{1}', github.workspace, '/package-lock.json')) }}
36+
restore-keys: |
37+
${{ runner.os }}-electron-cache-
38+
39+
- name: Cache Electron-Builder
40+
uses: actions/cache@v1
41+
with:
42+
path: ${{ github.workspace }}/.cache/electron-builder
43+
key: ${{ runner.os }}-electron-builder-cache-${{ hashFiles(format('{0}{1}', github.workspace, '/package-lock.json')) }}
44+
restore-keys: |
45+
${{ runner.os }}-electron-builder-cache-
46+
- uses: actions/checkout@v2
47+
- name: Install deps
48+
run: |
49+
sudo dpkg --add-architecture i386
50+
sudo apt-get update
51+
sudo apt-get install --no-install-recommends -y wine32 wine64 gcc-multilib g++-multilib
52+
- uses: actions/checkout@v2
53+
- name: Setup Node.js environment
54+
uses: actions/[email protected]
55+
with:
56+
node-version: 10.x
57+
- name: Install dependencies
58+
run: |
59+
npm i
60+
- name: Build Linux app (32 bit)
61+
run: npm run build:linux32
62+
- name: Build Linux app (64 bit)
63+
run: npm run build:linux64
64+
- name: Build Windows App (32 bit)
65+
run: npm run build:win32
66+
- name: Build Windows App (64 bit)
67+
run: npm run build:win64
68+
- name: Upload - push to artifact files
69+
uses: actions/upload-artifact@v1
70+
with:
71+
name: AhMyth
72+
path: ./AhMyth-Server/dist/

0 commit comments

Comments
 (0)