-
Notifications
You must be signed in to change notification settings - Fork 61
70 lines (68 loc) · 2.46 KB
/
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
name: CI
on:
push:
pull_request:
repository_dispatch:
schedule:
- cron: '0 4 * * *'
jobs:
build:
runs-on: ubuntu-latest
env:
nwjs-version: v0.45.1
steps:
- uses: actions/checkout@v2
- uses: krdlab/setup-haxe@v1
- name: Build
run: |
haxelib git format https://github.com/HaxeFoundation/format
haxelib git heaps https://github.com/HeapsIO/heaps
haxelib git castle https://github.com/ncannasse/castle
haxelib git hxbit https://github.com/ncannasse/hxbit
haxelib git hscript https://github.com/HaxeFoundation/hscript
haxelib git hxnodejs https://github.com/HaxeFoundation/hxnodejs
haxelib git domkit https://github.com/HeapsIO/domkit
haxelib git hx3compat https://github.com/HaxeFoundation/hx3compat
haxelib git hashlink https://github.com/HaxeFoundation/hashlink master other/haxelib/
haxe hide.hxml
- run: sudo apt-get install p7zip-full
- name: Windows
run: |
wget -O nwjs-win.zip https://dl.nwjs.io/${{env.nwjs-version}}/nwjs-sdk-${{env.nwjs-version}}-win-x64.zip
unzip nwjs-win.zip
mkdir -p zips
cp -r bin zips/windows
cp -r nwjs-sdk-${{env.nwjs-version}}-win-x64 zips/windows/nwjs
cd zips/windows
7z a -mm=Deflate -mx=9 ../windows.zip *
cd ../..
rm -rf zips/windows
- name: Linux
run: |
wget -O nwjs-linux.tar.gz https://dl.nwjs.io/${{env.nwjs-version}}/nwjs-sdk-${{env.nwjs-version}}-linux-x64.tar.gz
tar -xvzf nwjs-linux.tar.gz
mkdir -p zips
cp -r bin zips/linux
cp -r nwjs-sdk-${{env.nwjs-version}}-linux-x64 zips/linux/nwjs
cd zips/linux
7z a -mm=Deflate -mx=9 ../linux.zip *
cd ../..
rm -rf zips/linux
- name: Mac
run: |
wget -O nwjs-mac.zip https://dl.nwjs.io/${{env.nwjs-version}}/nwjs-sdk-${{env.nwjs-version}}-osx-x64.zip
unzip nwjs-mac.zip
mkdir -p zips/mac
cp -r nwjs-sdk-${{env.nwjs-version}}-osx-x64/nwjs.app zips/mac/nwjs.app
cp -r bin zips/mac/nwjs.app/Contents/Resources/app.nw
cd zips/mac
7z a -mm=Deflate -mx=9 ../mac.zip *
cd ../..
rm -rf zips/mac
- name: Deploy
run: |
mkdir ~/.ssh
echo "${{secrets.DEPLOY_KEY}}" > ~/.ssh/id_rsa
chmod 600 ~/.ssh/id_rsa
scp -o StrictHostKeyChecking=no zips/* gama11@community.heaps.io:builds/hide
if: github.ref == 'refs/heads/master'