-
Notifications
You must be signed in to change notification settings - Fork 3
139 lines (104 loc) · 2.93 KB
/
build.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
name: 'build'
on:
push:
pull_request:
schedule:
- cron: '0 0 * * 5'
workflow_dispatch:
env:
DOCKER_BUILDKIT: 1
jobs:
html5:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: ./.github/actions/godot
with:
platform: HTML5
path: ./dist/html5/index.html
- uses: actions/upload-artifact@v2
with:
name: html5
path: dist/html5/*
- name: Publish site to gh-pages
if: github.event_name != 'pull_request'
run: GITHUB_SHA="${{ github.sha }}" ./.github/publish.sh
lin:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: ./.github/actions/godot
with:
platform: Linux/X11
path: ./dist/lin/hwstudio.x86_64
- uses: actions/upload-artifact@v2
with:
name: lin
path: |
dist/lin/hwstudio.x86_64
dist/lin/hwstudio.pck
win:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: ./.github/actions/godot
with:
platform: Windows Desktop
path: ./dist/win/hwstudio.exe
- uses: actions/upload-artifact@v2
with:
name: win
path: |
dist/win/hwstudio.exe
dist/win/hwstudio.pck
mac:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: ./.github/actions/godot
with:
platform: Mac OSX
path: ./dist/mac/hwstudio.zip
- uses: actions/upload-artifact@v2
with:
name: mac
path: |
dist/mac/hwstudio.zip
nightly:
needs: [html5, win, lin, mac]
if: github.ref == 'refs/heads/main' && github.event_name != 'pull_request'
runs-on: ubuntu-latest
steps:
- run: sudo apt install tree
- uses: actions/download-artifact@v2
- name: Generate assets from artifacts
run: |
echo '· Generate about.txt and copy it to all the platform asset/artifact subdirs'
GIT_SHA="$(echo "${{ github.sha }}" | cut -c1-8)"
echo "Hardware Studio g${GIT_SHA} github.com/umarcor/hwstudio" > about.txt
cp about.txt html5/
cp about.txt lin/
cp about.txt win/
cp about.txt mac/
echo '· Create dir to place assets at'
mkdir assets
echo '· Package asset for HTML5'
tar czf assets/hwstudio_html5.tgz html5
echo '· Package asset for Linux'
tar czf assets/hwstudio_lin.tgz lin
echo '· Package asset for Windows'
zip -r assets/hwstudio_win.zip win
echo '· Package asset for MacOS'
cd mac
unzip hwstudio.zip
rm -rf hwstudio.zip
cd ..
zip -r assets/hwstudio_mac.zip mac
echo '· Print directory tree'
tree ./
- uses: pyTooling/Actions/releaser@r0
with:
token: ${{ github.token }}
tag: 'nightly'
rm: true
files: assets/*