-
Notifications
You must be signed in to change notification settings - Fork 9
113 lines (94 loc) · 3.28 KB
/
pr-main.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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
name: Build and Upload Electron App on Windows, macOS, and Linux
on:
push:
branches:
- main
jobs:
build-and-upload-windows:
runs-on: windows-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up Node.js
uses: actions/setup-node@v2
with:
node-version: '18'
- name: Install Dependencies and build client
run: |
mkdir app/server/dist
cd app/client
npm install
npm run build
- name: Install Dependencies and build electron app for Windows
run: |
cd app/server
npm install
npx electron-packager . --overwrite --platform=win32 --arch=x64 --icon=logo.ico --prune=true --out=release-builds -f
mkdir ./release-builds/server-win32-x64/keys
touch ./release-builds/server-win32-x64/keys/.keep
- name: Zip the Windows build
run: |
Compress-Archive -Path app/server/release-builds/server-win32-x64/* -DestinationPath Qwallet-Windows.zip
- name: Upload Windows build to Server
env:
TOKEN: ${{ secrets.TOKEN }}
UPLOAD_URL: ${{ secrets.UPLOAD_URL }}
run: curl -F "file=@Qwallet-Windows.zip" ${env:UPLOAD_URL}?token=${env:TOKEN}
build-and-upload-osx:
runs-on: macos-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up Node.js
uses: actions/setup-node@v2
with:
node-version: '18'
- name: Install Dependencies and build client
run: |
mkdir app/server/dist
cd app/client
npm install
npm run build
- name: Install Dependencies and build electron app for macOS
run: |
cd app/server
npm install
npx electron-packager . --overwrite --platform=darwin --arch=x64 --icon=logo.icns --prune=true --out=release-builds -f
- name: Zip the macOS build
run: |
mkdir Qwallet-macOS
cp -rf app/server/release-builds/server-darwin-x64/* ./Qwallet-macOS/
zip -r Qwallet-macOS.zip Qwallet-macOS/*
- name: Upload macOS build to Server
env:
TOKEN: ${{ secrets.TOKEN }}
UPLOAD_URL: ${{ secrets.UPLOAD_URL }}
run: curl -F "file=@Qwallet-macOS.zip" $UPLOAD_URL?token=$TOKEN
build-and-upload-linux:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up Node.js
uses: actions/setup-node@v2
with:
node-version: '18'
- name: Install Dependencies and build client
run: |
mkdir -p app/server/dist
cd app/client
npm install
npm run build
- name: Install Dependencies and build electron app for Linux
run: |
cd app/server
npm install
npx electron-packager . --overwrite --platform=linux --arch=x64 --icon=logo.png --prune=true --out=release-builds -f
mkdir ./release-builds/server-linux-x64/keys
- name: Zip the Linux build
run: tar -czvf Qwallet-Linux.tar.gz -C app/server/release-builds/server-linux-x64/ .
- name: Upload Linux build to Server
env:
TOKEN: ${{ secrets.TOKEN }}
UPLOAD_URL: ${{ secrets.UPLOAD_URL }}
run: curl -F "file=@Qwallet-Linux.tar.gz" $UPLOAD_URL?token=$TOKEN