-
Notifications
You must be signed in to change notification settings - Fork 146
175 lines (169 loc) · 6.16 KB
/
nightly.yml
File metadata and controls
175 lines (169 loc) · 6.16 KB
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
name: Nightly builds
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
on:
workflow_dispatch:
schedule:
- cron: '0 0 * * *'
jobs:
nightly_build_on_linux:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@master
with:
node-version: '22.x'
- name: update package directory
run: sudo apt update
- name: install rpm and libarchive
run: sudo apt install rpm libarchive-tools
- name: install dependencies
run: npm install
- name: run unit tests
run: npm run test
- name: build
run: |
for i in 1 2 3; do
npm run electron:linux && break
if [ "$i" -eq 3 ]; then
echo "Linux build failed after 3 attempts"
exit 1
fi
echo "Linux build failed (attempt $i), retrying in 30s..."
sleep 30
done
- name: fetch current version
id: ver_name
uses: notiz-dev/github-action-json-property@release
with:
path: 'package.json'
prop_path: 'version'
- name: uploading rpm artifact
uses: actions/upload-artifact@v4
with:
name: dopamine-nightly-rpm
path: release/Dopamine-*.rpm
- name: upload deb artifact
uses: actions/upload-artifact@v4
with:
name: dopamine-nightly-deb
path: release/Dopamine-*.deb
- name: upload appimage artifact
uses: actions/upload-artifact@v4
with:
name: dopamine-nightly-appimage
path: release/Dopamine-*.AppImage
- name: upload snap artifact
uses: actions/upload-artifact@v4
with:
name: dopamine-nightly-snap
path: release/Dopamine-*.snap
nightly_build_pacman_on_arch:
runs-on: ubuntu-22.04
container:
image: archlinux:latest
steps:
- uses: actions/checkout@v2
- name: install Arch dependencies
run: |
pacman -Syu --noconfirm
pacman -S --noconfirm nodejs npm git python base-devel libarchive libxcrypt-compat
- name: install dependencies
run: npm install
- name: run unit tests
run: npm run test
- name: build pacman package
run: |
npm run build:prod
for i in 1 2 3; do
npx electron-builder build --linux pacman --config electron-builder.config.js && break
if [ "$i" -eq 3 ]; then
echo "Pacman build failed after 3 attempts"
exit 1
fi
echo "Pacman build failed (attempt $i), retrying in 30s..."
sleep 30
done
- name: upload pacman artifact
uses: actions/upload-artifact@v4
with:
name: dopamine-nightly-pacman
path: release/Dopamine-*.pacman
nightly_build_on_mac_arm:
runs-on: macos-15
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@master
with:
node-version: '22.x'
- name: install dependencies
run: npm install
- name: run unit tests
run: npm run test
- name: build
run: npm run electron:mac
- name: fetch current version
id: ver_name
uses: notiz-dev/github-action-json-property@release
with:
path: 'package.json'
prop_path: 'version'
- name: upload build artifacts
uses: actions/upload-artifact@v4
with:
name: dopamine-nightly-macos-arm
path: release/Dopamine-*.dmg
nightly_build_on_mac_intel:
runs-on: macos-15-intel
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@master
with:
node-version: '22.x'
- name: install dependencies
run: npm install
- name: run unit tests
run: npm run test
- name: build
run: npm run electron:mac
- name: fetch current version
id: ver_name
uses: notiz-dev/github-action-json-property@release
with:
path: 'package.json'
prop_path: 'version'
- name: upload build artifacts
uses: actions/upload-artifact@v4
with:
name: dopamine-nightly-macos-intel
path: release/Dopamine-*.dmg
nightly_build_on_win:
runs-on: windows-2022
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '22'
- name: Install dependencies
run: npm install
- name: Run unit tests
run: npm run test
- name: Build
run: npm run electron:windows
- name: Fetch current version
id: ver_name
uses: notiz-dev/github-action-json-property@release
with:
path: package.json
prop_path: version
# Use built-in 7zip (already installed on the runner)
- name: Create 7z Archive
shell: powershell
run: |
cd release
& "C:\Program Files\7-Zip\7z.exe" a ..\dopamine-nightly-win.7z Dopamine-*.exe
- name: Upload Build Artifact
uses: actions/upload-artifact@v4
with:
name: dopamine-nightly-win
path: dopamine-nightly-win.7z