4949 cp prebuild/Linux/binding.gyp binding.gyp
5050 node-gyp rebuild -j 2
5151 . prebuild/Linux/bundle.sh
52+
5253 - name : Test binary
5354 run : |
5455 cd /root/harfbuzz-* && make uninstall
5859 cd /root/libjpeg-* && make uninstall
5960 cd /root/giflib-* && make uninstall
6061 cd $GITHUB_WORKSPACE && npm test
62+
6163 - name : Make bundle
6264 id : make_bundle
6365 run : . prebuild/tarball.sh
@@ -70,13 +72,16 @@ jobs:
7072 const assetName = "${{ steps.make_bundle.outputs.asset_name }}";
7173 const tagName = process.env.UPLOAD_TO || process.env.CANVAS_VERSION_TO_BUILD;
7274 const [owner, repo] = process.env.GITHUB_REPOSITORY.split("/");
75+
7376 const releases = await github.repos.listReleases({owner, repo});
7477 const release = releases.data.find(r => r.tag_name === tagName);
7578 if (!release)
7679 throw new Error(`Tag ${tagName} not found. Did you make the GitHub release?`);
80+
7781 const oldAsset = release.assets.find(a => a.name === assetName);
7882 if (oldAsset)
7983 await github.repos.deleteReleaseAsset({owner, repo, asset_id: oldAsset.id});
84+
8085 // (This is equivalent to actions/upload-release-asset. We're
8186 // already in a script, so might as well do it here.)
8287 const r = await github.repos.uploadReleaseAsset({
8893 name: assetName,
8994 data: fs.readFileSync(assetName)
9095 });
96+
9197 macOS :
9298 strategy :
9399 matrix :
@@ -192,6 +198,7 @@ jobs:
192198 msys2do cp prebuild/Windows/binding.gyp binding.gyp
193199 msys2do node-gyp configure
194200 msys2do node-gyp rebuild -j 2
201+
195202 - name : Bundle
196203 run : msys2do . prebuild/Windows/bundle.sh
197204
@@ -216,9 +223,11 @@ jobs:
216223 const release = releases.data.find(r => r.tag_name === tagName);
217224 if (!release)
218225 throw new Error(`Tag ${tagName} not found. Did you make the GitHub release?`);
226+
219227 const oldAsset = release.assets.find(a => a.name === assetName);
220228 if (oldAsset)
221229 await github.repos.deleteReleaseAsset({owner, repo, asset_id: oldAsset.id});
230+
222231 // (This is equivalent to actions/upload-release-asset. We're
223232 // already in a script, so might as well do it here.)
224233 const r = await github.repos.uploadReleaseAsset({
0 commit comments