49
49
cp prebuild/Linux/binding.gyp binding.gyp
50
50
node-gyp rebuild -j 2
51
51
. prebuild/Linux/bundle.sh
52
+
52
53
- name : Test binary
53
54
run : |
54
55
cd /root/harfbuzz-* && make uninstall
58
59
cd /root/libjpeg-* && make uninstall
59
60
cd /root/giflib-* && make uninstall
60
61
cd $GITHUB_WORKSPACE && npm test
62
+
61
63
- name : Make bundle
62
64
id : make_bundle
63
65
run : . prebuild/tarball.sh
@@ -70,13 +72,16 @@ jobs:
70
72
const assetName = "${{ steps.make_bundle.outputs.asset_name }}";
71
73
const tagName = process.env.UPLOAD_TO || process.env.CANVAS_VERSION_TO_BUILD;
72
74
const [owner, repo] = process.env.GITHUB_REPOSITORY.split("/");
75
+
73
76
const releases = await github.repos.listReleases({owner, repo});
74
77
const release = releases.data.find(r => r.tag_name === tagName);
75
78
if (!release)
76
79
throw new Error(`Tag ${tagName} not found. Did you make the GitHub release?`);
80
+
77
81
const oldAsset = release.assets.find(a => a.name === assetName);
78
82
if (oldAsset)
79
83
await github.repos.deleteReleaseAsset({owner, repo, asset_id: oldAsset.id});
84
+
80
85
// (This is equivalent to actions/upload-release-asset. We're
81
86
// already in a script, so might as well do it here.)
82
87
const r = await github.repos.uploadReleaseAsset({
88
93
name: assetName,
89
94
data: fs.readFileSync(assetName)
90
95
});
96
+
91
97
macOS :
92
98
strategy :
93
99
matrix :
@@ -192,6 +198,7 @@ jobs:
192
198
msys2do cp prebuild/Windows/binding.gyp binding.gyp
193
199
msys2do node-gyp configure
194
200
msys2do node-gyp rebuild -j 2
201
+
195
202
- name : Bundle
196
203
run : msys2do . prebuild/Windows/bundle.sh
197
204
@@ -212,13 +219,16 @@ jobs:
212
219
const assetName = "${{ steps.make_bundle.outputs.asset_name }}";
213
220
const tagName = process.env.UPLOAD_TO || process.env.CANVAS_VERSION_TO_BUILD;
214
221
const [owner, repo] = process.env.GITHUB_REPOSITORY.split("/");
222
+
215
223
const releases = await github.repos.listReleases({owner, repo});
216
224
const release = releases.data.find(r => r.tag_name === tagName);
217
225
if (!release)
218
226
throw new Error(`Tag ${tagName} not found. Did you make the GitHub release?`);
227
+
219
228
const oldAsset = release.assets.find(a => a.name === assetName);
220
229
if (oldAsset)
221
230
await github.repos.deleteReleaseAsset({owner, repo, asset_id: oldAsset.id});
231
+
222
232
// (This is equivalent to actions/upload-release-asset. We're
223
233
// already in a script, so might as well do it here.)
224
234
const r = await github.repos.uploadReleaseAsset({
0 commit comments