This repository has been archived by the owner on Jan 3, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
113 lines (89 loc) · 2.89 KB
/
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
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: release
on:
release:
types:
- created
jobs:
build_windows:
runs-on: windows-latest
steps:
- name: Check out git repository
uses: actions/checkout@v1
- name: Install Node.js and npm
uses: actions/setup-node@v1
with:
node-version: 12
- name: Check release tag
run: node -e "if (require('./package.json').version !== '${{ github.ref }}'.replace('refs/tags/', '')) throw new Error('Wrong release tag!')"
- name: Install dependencies
run: npm install
- name: Build app
run: npm run build
- name: Pack app
run: npm run pack
- name: Upload artifact
uses: actions/upload-artifact@v1
with:
name: dist
path: app/dist
- name: Upload files
uses: ./.github/actions/upload
with:
token: ${{ secrets.GITHUB_TOKEN }}
secretId: ${{ secrets.SECRET_ID }}
secretKey: ${{ secrets.SECRET_KEY }}
bucket: ${{ secrets.COS_BUCKET }}
files: release/win-ia32-unpacked/resources/app.asar release/nsis-web/PureLauncher.exe release/nsis-web/pure-launcher-{VERSION}-x64.nsis.7z?x64.nsis.7z release/nsis-web/pure-launcher-{VERSION}-ia32.nsis.7z?ia32.nsis.7z
build_macos:
runs-on: macos-latest
needs: build_windows
steps:
- name: Check out git repository
uses: actions/checkout@v1
- name: Install Node.js and npm
uses: actions/setup-node@v1
with:
node-version: 12
- name: Install dependencies
run: npm install
- name: Download artifact
uses: actions/download-artifact@v1
with:
name: dist
- name: Pack app
run: npm run pack
- name: Upload files
uses: ./.github/actions/upload
with:
token: ${{ secrets.GITHUB_TOKEN }}
secretId: ${{ secrets.SECRET_ID }}
secretKey: ${{ secrets.SECRET_KEY }}
bucket: ${{ secrets.COS_BUCKET }}
files: release/PureLauncher.dmg
build_linux:
runs-on: ubuntu-latest
needs: build_macos
steps:
- name: Check out git repository
uses: actions/checkout@v1
- name: Install Node.js and npm
uses: actions/setup-node@v1
with:
node-version: 12
- name: Install dependencies
run: npm install
- name: Download artifact
uses: actions/download-artifact@v1
with:
name: dist
- name: Pack app
run: npm run pack
- name: Upload files to Github release
uses: ./.github/actions/upload
with:
token: ${{ secrets.GITHUB_TOKEN }}
secretId: ${{ secrets.SECRET_ID }}
secretKey: ${{ secrets.SECRET_KEY }}
bucket: ${{ secrets.COS_BUCKET }}
final: true
files: release/PureLauncher.tar.gz release/PureLauncher.deb release/PureLauncher.rpm