16
16
# workflow_dispatch:
17
17
18
18
jobs :
19
- build :
20
- name : Build tar.gz AppImage
19
+ build-src :
20
+ name : Build Base Packages
21
21
runs-on : ubuntu-latest
22
22
23
23
strategy :
@@ -53,24 +53,89 @@ jobs:
53
53
export NO_WINE=false
54
54
export DOCKER_UID=$UID
55
55
export DOCKER_GID=$GID
56
- # tar.gz AppImage
57
56
ls -l
57
+ export NO_WINE=false
58
58
docker-compose up
59
- mkdir -p tmp/build
60
- tools/build-release.sh ${{ matrix.ARCH }} ${{ steps.tag.outputs.tag }}
59
+
60
+ - name : Compress Resources
61
+ run : |
62
+ ls -l
63
+ mkdir -p tmp/src
64
+ cp node/bin/node package.nw/node
65
+ cd package.nw && rm -rf node.exe node && ln -s node.exe node
66
+ cd ..
67
+ tar -zcf tmp/src/src-wine.tar.gz bin nwjs package.nw tools
68
+ export NO_WINE=true
69
+ "tools/fix-core.sh"
70
+ "tools/fix-other.sh"
71
+ tar -zcf tmp/src/src-no-wine.tar.gz bin nwjs package.nw tools
61
72
62
73
- name : Compress nodegit compiler
63
74
run : |
64
75
ls -l
65
- cp -r package.nw/node_modules/nodegit tmp/build/nodegit
66
- cp -r compiler tmp/build/compiler
67
- cd tmp/build
68
- ls -l
76
+ mkdir -p tmp/build
77
+ cp -r package.nw/node_modules/nodegit .
69
78
sudo rm -rf compiler/test
70
79
tar -zcf compiler.tar.gz compiler
71
80
tar -zcf nodegit.tar.gz nodegit
72
- rm -rf compiler nodegit
81
+ mv nodegit.tar.gz tmp/build
82
+ mv compiler.tar.gz tmp/build
83
+ cd tmp/build
84
+ ls -l
85
+
86
+ - name : View Directory
87
+ run : |
88
+ ls -l
89
+
90
+ - name : Upload artifact
91
+ uses : actions/upload-artifact@v2.3.1
92
+ with :
93
+ # Artifact name
94
+ name : wechat-devtools-${{ matrix.ARCH }}.src
95
+ path : tmp/src
96
+
97
+ build-tar :
98
+ name : Build tar.gz AppImage
99
+ needs :
100
+ - build-src
101
+ runs-on : ubuntu-latest
102
+
103
+ strategy :
104
+ matrix :
105
+ ARCH : ['x86_64']
106
+ # See supported Node.js release schedule at https://nodejs.org/en/about/releases/
107
+
108
+ steps :
109
+ - uses : actions/checkout@v2
110
+ - name : Download artifacts
111
+ uses : actions/download-artifact@v2
112
+
113
+ - name : Test
114
+ run : |
115
+ echo "$UID, $GID"
116
+
117
+ - name : Generate TAG
118
+ id : Tag
119
+ run : |
120
+ tag='continuous'
121
+ name='Continuous Build'
122
+ if [ 'true' == ${{ startsWith(github.ref, 'refs/tags/') }} ];then
123
+ tag='${{ github.ref_name }}'
124
+ name='${{ github.ref_name }}'
125
+ fi
126
+ echo "tag result: $tag - $name"
127
+ echo "::set-output name=tag::$tag"
128
+ echo "::set-output name=name::$name"
129
+
130
+ - name : Build
131
+ run : |
132
+ export NO_WINE=false
133
+ export ACTION_MODE=true
134
+ # tar.gz AppImage
73
135
ls -l
136
+ mkdir -p tmp/build
137
+ tools/build-prepare.sh
138
+ tools/build-release.sh ${{ matrix.ARCH }} ${{ steps.tag.outputs.tag }}
74
139
75
140
- name : View Directory
76
141
run : |
85
150
86
151
build-deb :
87
152
name : Build Deb Package
153
+ needs :
154
+ - build-src
88
155
runs-on : ubuntu-18.04
89
156
90
157
strategy :
94
161
95
162
steps :
96
163
- uses : actions/checkout@v2
97
- - name : Use Node.js ${{ matrix.node-version }}
98
- uses : actions/setup-node @v2
164
+ - name : Download artifacts
165
+ uses : actions/download-artifact @v2
99
166
100
167
- name : Generate TAG
101
168
id : Tag
@@ -113,12 +180,12 @@ jobs:
113
180
- name : Build Deb Package
114
181
run : |
115
182
export BUILD_VERSION=${{ steps.tag.outputs.tag }}
116
- export DOCKER_UID=$UID
117
- export DOCKER_GID=$GID
118
- export ACTION_MODE=true
119
- docker-compose up
120
183
ls -l
121
184
mkdir -p tmp/build
185
+ tools/build-prepare.sh
186
+ tools/build-deb.sh ${{ steps.tag.outputs.tag }}
187
+ export NO_WINE=true
188
+ tools/build-prepare.sh
122
189
tools/build-deb.sh ${{ steps.tag.outputs.tag }}
123
190
124
191
- name : Upload artifact
@@ -130,6 +197,8 @@ jobs:
130
197
131
198
build-deepin :
132
199
name : Build Deepin Package
200
+ needs :
201
+ - build-src
133
202
runs-on : ubuntu-18.04
134
203
135
204
strategy :
@@ -139,8 +208,8 @@ jobs:
139
208
140
209
steps :
141
210
- uses : actions/checkout@v2
142
- - name : Use Node.js ${{ matrix.node-version }}
143
- uses : actions/setup-node @v2
211
+ - name : Download artifacts
212
+ uses : actions/download-artifact @v2
144
213
145
214
- name : Generate TAG
146
215
id : Tag
@@ -158,12 +227,12 @@ jobs:
158
227
- name : Build Deepin Package
159
228
run : |
160
229
export BUILD_VERSION=${{ steps.tag.outputs.tag }}
161
- export DOCKER_UID=$UID
162
- export DOCKER_GID=$GID
163
- export ACTION_MODE=true
164
- docker-compose up
165
230
ls -l
166
231
mkdir -p tmp/build
232
+ tools/build-prepare.sh
233
+ tools/build-deepin.sh ${{ steps.tag.outputs.tag }}
234
+ export NO_WINE=true
235
+ tools/build-prepare.sh
167
236
tools/build-deepin.sh ${{ steps.tag.outputs.tag }}
168
237
169
238
- name : Upload artifact
@@ -249,7 +318,7 @@ jobs:
249
318
upload :
250
319
name : Create release and upload artifacts
251
320
needs :
252
- - build
321
+ - build-tar
253
322
- build-deb
254
323
- build-deepin
255
324
- build-arch
0 commit comments