Skip to content

Commit 4fa0721

Browse files
authored
Merge pull request #6 from srevinsaju/big-merge
Merge upstream srevinsaju/musicblocks-app to sugarlabs/musicblocks-launcher
2 parents 628f7ba + d570d5e commit 4fa0721

File tree

16 files changed

+3023
-40
lines changed

16 files changed

+3023
-40
lines changed

.github/workflows/continuous.yml

Lines changed: 353 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,353 @@
1+
2+
3+
name: Continuous
4+
5+
on:
6+
push:
7+
branches: [master]
8+
pull_request:
9+
branches: [master]
10+
11+
12+
jobs:
13+
linux:
14+
runs-on: ubuntu-18.04
15+
steps:
16+
- uses: actions/checkout@v2
17+
- uses: actions/setup-node@v1
18+
with:
19+
node-version: 12
20+
21+
- run: |
22+
cd src
23+
npm i
24+
- run: |
25+
cd src
26+
git clone https://github.com/sugarlabs/musicblocks
27+
- run: |
28+
cd src
29+
sh ./patch.sh
30+
- run: |
31+
cd src
32+
npx electron-builder --linux appimage --publish never
33+
34+
- name: Patch AppImage
35+
run: |
36+
cd src
37+
mkdir -p dist/appimage
38+
cd dist/
39+
./*.AppImage --appimage-extract
40+
cp linux-unpacked/resources/app.asar squashfs-root/resources/.
41+
wget https://github.com/AppImage/AppImageKit/releases/download/continuous/appimagetool-x86_64.AppImage
42+
chmod +x appimagetool-x86_64.AppImage
43+
rm Musicblocks*.AppImage
44+
./appimagetool-x86_64.AppImage squashfs-root -n
45+
ls
46+
rm -rf squashfs-root
47+
mv Musicblocks*.AppImage appimage/.
48+
chmod +x appimage/*.AppImage
49+
cd ..
50+
51+
- name: Create Snap
52+
run: |
53+
cd src;
54+
npx electron-builder --linux snap --publish never
55+
env:
56+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
57+
58+
- name: move snap
59+
run: |
60+
cd src
61+
mkdir -p dist/snap
62+
mv dist/*.snap dist/snap/.
63+
64+
- name: Create .rpm
65+
run: |
66+
cd src
67+
sudo apt-get -y install rpm
68+
npx electron-builder --linux rpm --publish never
69+
env:
70+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
71+
72+
- name: move rpm
73+
run: |
74+
cd src
75+
mkdir -p dist/rpm
76+
mv dist/*.rpm dist/rpm/.
77+
78+
- name: Upload RPM
79+
uses: actions/[email protected]
80+
with:
81+
name: Musicblocks-continuous-x86_64.rpm
82+
path: 'src/dist/rpm/'
83+
84+
85+
- name: Create .deb
86+
run: |
87+
cd src
88+
npx electron-builder --linux deb --publish never
89+
env:
90+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
91+
92+
- name: move deb
93+
run: |
94+
cd src
95+
mkdir -p dist/deb
96+
mv dist/*.deb dist/deb/.
97+
98+
- name: Upload Debian
99+
uses: actions/[email protected]
100+
with:
101+
name: Musicblocks-continuous-x86_64.deb
102+
path: 'src/dist/deb/'
103+
104+
- name: Upload Appimage
105+
uses: actions/[email protected]
106+
with:
107+
name: Musicblocks-continuous-x86_64.AppImage
108+
path: 'src/dist/appimage/'
109+
110+
- name: Upload Snap
111+
uses: actions/[email protected]
112+
with:
113+
name: Musicblocks-continuous-x86_64.snap
114+
path: 'src/dist/snap/'
115+
116+
117+
linux_arm64:
118+
runs-on: ubuntu-18.04
119+
steps:
120+
- uses: actions/checkout@v2
121+
- uses: actions/setup-node@v1
122+
with:
123+
node-version: 12
124+
- uses: uraimo/[email protected]
125+
name: Run commands
126+
id: runcmd
127+
with:
128+
arch: arm64
129+
distro: ubuntu18.04
130+
131+
- run: |
132+
cd src
133+
npm i
134+
- run: |
135+
cd src
136+
git clone https://github.com/sugarlabs/musicblocks
137+
- run: |
138+
cd src
139+
sh ./patch.sh
140+
- run: |
141+
cd src
142+
npx electron-builder --arm64 --linux AppImage --publish never
143+
144+
- name: Patch AppImage arm64
145+
run: |
146+
cd src
147+
mkdir -p dist/appimage
148+
cd dist/
149+
./*.AppImage --appimage-extract
150+
cp linux-arm64-unpacked/resources/app.asar squashfs-root/resources/.
151+
wget https://github.com/AppImage/AppImageKit/releases/download/continuous/appimagetool-aarch64.AppImage
152+
chmod +x appimagetool-aarch64.AppImage
153+
rm Musicblocks*.AppImage
154+
./appimagetool-aarch64.AppImage squashfs-root -n
155+
ls
156+
rm -rf squashfs-root
157+
mv Musicblocks*.AppImage appimage/.
158+
chmod +x appimage/*.AppImage
159+
cd ..
160+
161+
- name: Upload Appimage arm64
162+
uses: actions/[email protected]
163+
with:
164+
name: Musicblocks-continuous-aarch64.AppImage
165+
path: 'src/dist/appimage/'
166+
167+
168+
linux_armv7:
169+
runs-on: ubuntu-18.04
170+
steps:
171+
- uses: actions/checkout@v2
172+
- uses: actions/setup-node@v1
173+
with:
174+
node-version: 12
175+
- uses: uraimo/[email protected]
176+
name: Run commands
177+
id: runcmd
178+
with:
179+
arch: armv7
180+
distro: ubuntu18.04
181+
182+
- run: |
183+
cd src
184+
npm i
185+
- run: |
186+
cd src
187+
git clone https://github.com/sugarlabs/musicblocks
188+
- run: |
189+
cd src
190+
sh ./patch.sh
191+
- run: |
192+
cd src
193+
npx electron-builder --armv7l --linux AppImage --publish never
194+
195+
- name: Patch AppImage armv7
196+
run: |
197+
cd src
198+
mkdir -p dist/appimage
199+
cd dist/
200+
./*.AppImage --appimage-extract
201+
cp linux-armv7l-unpacked/resources/app.asar squashfs-root/resources/.
202+
wget https://github.com/AppImage/AppImageKit/releases/download/continuous/appimagetool-armhf.AppImage
203+
chmod +x appimagetool-armhf.AppImage
204+
rm Musicblocks*.AppImage
205+
./appimagetool-armhf.AppImage squashfs-root -n
206+
ls
207+
rm -rf squashfs-root
208+
mv Musicblocks*.AppImage appimage/.
209+
chmod +x appimage/*.AppImage
210+
cd ..
211+
212+
- name: Upload Appimage armv7
213+
uses: actions/[email protected]
214+
with:
215+
name: Musicblocks-continuous-arm.AppImage
216+
path: 'src/dist/appimage/'
217+
218+
219+
windows:
220+
runs-on: windows-latest
221+
steps:
222+
- uses: actions/checkout@v2
223+
- uses: actions/setup-node@v1
224+
with:
225+
node-version: 12
226+
- name: Install npm dependencies
227+
run: |
228+
cd src
229+
npm i
230+
- name: Clone musicblocks source code
231+
run: |
232+
cd src
233+
git clone https://github.com/sugarlabs/musicblocks
234+
- name: Patch the musicblocks code base
235+
run: |
236+
cd src
237+
sh ./patch.sh
238+
- name: Create EXE for Windows
239+
run: |
240+
cd src
241+
npx electron-builder --win --publish never
242+
env:
243+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
244+
245+
- name: Copy dist
246+
run: |
247+
cd src
248+
mkdir -p dist/exe
249+
mv dist/*.exe dist/exe/.
250+
251+
- name: Upload Windows exe
252+
uses: actions/[email protected]
253+
with:
254+
name: Musicblocks-continuous-x86_64.exe
255+
path: 'src/dist/exe/'
256+
257+
macos:
258+
runs-on: macos-latest
259+
steps:
260+
- uses: actions/checkout@v2
261+
- uses: actions/setup-node@v1
262+
with:
263+
node-version: 12
264+
265+
- name: Install npm dependencies
266+
run: |
267+
cd src
268+
npm i
269+
270+
- name: Install gnu-sed for patching
271+
run: |
272+
brew install gnu-sed
273+
274+
- name: Clone musicblocks
275+
run: |
276+
cd src
277+
git clone https://github.com/sugarlabs/musicblocks
278+
279+
- name: Patch Musicblocks codebase
280+
run: |
281+
cd src
282+
gsed -i 's/sed/gsed/g' patch.sh
283+
sh ./patch.sh
284+
285+
- name: Build dmg
286+
run: |
287+
cd src
288+
npx electron-builder --mac --publish never
289+
env:
290+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
291+
292+
- name: Copy dist
293+
run: |
294+
cd src
295+
mkdir -p dist/dmg
296+
mv dist/*.dmg dist/dmg/.
297+
298+
- name: Upload MacOS DMG
299+
uses: actions/[email protected]
300+
with:
301+
name: Musicblocks-continuous-x86_64.dmg
302+
path: 'src/dist/dmg/'
303+
304+
Release:
305+
needs: [macos, windows, linux]
306+
runs-on: ubuntu-latest
307+
strategy:
308+
matrix:
309+
version: [3.8]
310+
311+
steps:
312+
- uses: actions/download-artifact@v1
313+
with:
314+
name: Musicblocks-continuous-x86_64.dmg
315+
- uses: actions/download-artifact@v1
316+
with:
317+
name: Musicblocks-continuous-x86_64.exe
318+
- uses: actions/download-artifact@v1
319+
with:
320+
name: Musicblocks-continuous-x86_64.snap
321+
- uses: actions/download-artifact@v1
322+
with:
323+
name: Musicblocks-continuous-x86_64.AppImage
324+
- uses: actions/download-artifact@v1
325+
with:
326+
name: Musicblocks-continuous-aarch64.AppImage
327+
- uses: actions/download-artifact@v1
328+
with:
329+
name: Musicblocks-continuous-arm.AppImage
330+
- uses: actions/download-artifact@v1
331+
with:
332+
name: Musicblocks-continuous-x86_64.deb
333+
- uses: actions/download-artifact@v1
334+
with:
335+
name: Musicblocks-continuous-x86_64.rpm
336+
337+
338+
- name: Release
339+
uses: marvinpinto/action-automatic-releases@latest
340+
if: github.ref == 'refs/heads/master'
341+
with:
342+
automatic_release_tag: continuous
343+
title: continuous
344+
files: |
345+
Musicblocks-continuous-x86_64.dmg
346+
Musicblocks-continuous-x86_64.exe
347+
Musicblocks-continuous-x86_64.snap
348+
Musicblocks-continuous-x86_64.AppImage
349+
Musicblocks-continuous-aarch64.AppImage
350+
Musicblocks-continuous-arm.AppImage
351+
Musicblocks-continuous-x86_64.deb
352+
Musicblocks-continuous-x86_64.rpm
353+
repo_token: ${{ secrets.GITHUB_TOKEN }}

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
musicblocks/

0 commit comments

Comments
 (0)