forked from lyswhut/lx-music-desktop
-
Notifications
You must be signed in to change notification settings - Fork 0
181 lines (151 loc) · 4.53 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
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
name: Build
on:
push:
branches:
- master
jobs:
# CheckCode:
# name: Lint Code
# runs-on: ubuntu-latest
# steps:
# - name: Check out git repository
# uses: actions/checkout@v4
# - name: Install Node.js
# uses: actions/setup-node@v4
# with:
# node-version: '16'
# - name: Cache file
# uses: actions/cache@v4
# with:
# path: |
# node_modules
# $HOME/.cache/electron
# $HOME/.cache/electron-builder
# $HOME/.npm/_prebuilds
# key: ${{ runner.os }}-build-caches-${{ hashFiles('**/package-lock.json') }}
# restore-keys: |
# ${{ runner.os }}-build-
# - name: Install Dependencies
# run: |
# npm ci
# - name: Lint src code
# run: npm run lint
Windows:
name: Windows
runs-on: windows-latest
env:
NPM_CACHE: '%APPDATA%\npm-cache'
ELECTRON_CACHE: '%LOCALAPPDATA%\electron\Cache'
ELECTRON_BUILDERCACHE: '%LOCALAPPDATA%\electron-builder\Cache'
# needs: CheckCode
steps:
- name: Check out git repository
uses: actions/checkout@v4
- name: Setup Node Env
uses: ./.github/actions/setup
- name: Build src code
run: npm run build
- name: Release package
run: |
npm run publish:win:7z:x64
npm run publish:win:7z:arm64
npm run publish:win:setup:arm64
npm run publish:win:setup:x64
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
BT_TOKEN: ${{ secrets.BT_TOKEN }}
- name: Generate file MD5
run: |
cd build
Get-FileHash *.exe,*.7z -Algorithm MD5 | Format-List
Windows_7:
name: Windows
runs-on: windows-latest
env:
NPM_CACHE: '%APPDATA%\npm-cache'
ELECTRON_CACHE: '%LOCALAPPDATA%\electron\Cache'
ELECTRON_BUILDERCACHE: '%LOCALAPPDATA%\electron-builder\Cache'
# needs: CheckCode
steps:
- name: Check out git repository
uses: actions/checkout@v4
- name: Setup Node Env
uses: ./.github/actions/setup
- name: Build src code
run: npm run build
- name: Prepare win7 electron env
run: |
npm install electron@22
pip.exe install setuptools
- name: Release win7 package
run: |
npm run publish:win7:setup:x64
npm run publish:win7:7z:x64
npm run publish:win7:7z:x86
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
BT_TOKEN: ${{ secrets.BT_TOKEN }}
- name: Generate file MD5
run: |
cd build
Get-FileHash *.exe,*.7z -Algorithm MD5 | Format-List
Mac:
name: Mac
runs-on: macos-latest
env:
NPM_CACHE: $HOME/.npm
ELECTRON_CACHE: $HOME/.cache/electron
ELECTRON_BUILDERCACHE: $HOME/.cache/electron-builder
# needs: CheckCode
steps:
- name: Check out git repository
uses: actions/checkout@v4
- name: Install python3 setuptools
run: python3 -m pip install setuptools
- name: Setup Node Env
uses: ./.github/actions/setup
- name: Build src code
run: npm run build
- name: Release package
run: |
npm run publish:mac:dmg
npm run publish:mac:dmg:arm64
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
BT_TOKEN: ${{ secrets.BT_TOKEN }}
- name: Generate file MD5
run: |
cd build
md5 *.dmg
Linux:
name: Linux
runs-on: ubuntu-latest
env:
NPM_CACHE: $HOME/.npm
ELECTRON_CACHE: $HOME/.cache/electron
ELECTRON_BUILDERCACHE: $HOME/.cache/electron-builder
# needs: CheckCode
steps:
- name: Install package
run: sudo apt-get update && sudo apt-get install -y rpm libarchive-tools
- name: Check out git repository
uses: actions/checkout@v4
- name: Setup Node Env
uses: ./.github/actions/setup
- name: Build src code
run: npm run build
- name: Release package
run: |
npm run publish:linux:deb:amd64
npm run publish:linux:deb:arm64
npm run publish:linux:deb:armv7l
npm run publish:linux:appImage
npm run publish:linux:rpm
npm run publish:linux:pacman
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
BT_TOKEN: ${{ secrets.BT_TOKEN }}
- name: Generate file MD5
run: |
cd build
md5sum *.deb *.rpm *.pacman *.AppImage