From 886d26be8e2305c7162514647dac6345b1874e16 Mon Sep 17 00:00:00 2001 From: James Vaughan Date: Tue, 27 Feb 2024 20:39:57 -0800 Subject: [PATCH] Restore whitespace changes --- .github/workflows/prebuild.yaml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/.github/workflows/prebuild.yaml b/.github/workflows/prebuild.yaml index 8d8f2f08d..c54b9474e 100644 --- a/.github/workflows/prebuild.yaml +++ b/.github/workflows/prebuild.yaml @@ -49,6 +49,7 @@ jobs: cp prebuild/Linux/binding.gyp binding.gyp node-gyp rebuild -j 2 . prebuild/Linux/bundle.sh + - name: Test binary run: | cd /root/harfbuzz-* && make uninstall @@ -58,6 +59,7 @@ jobs: cd /root/libjpeg-* && make uninstall cd /root/giflib-* && make uninstall cd $GITHUB_WORKSPACE && npm test + - name: Make bundle id: make_bundle run: . prebuild/tarball.sh @@ -70,13 +72,16 @@ jobs: const assetName = "${{ steps.make_bundle.outputs.asset_name }}"; const tagName = process.env.UPLOAD_TO || process.env.CANVAS_VERSION_TO_BUILD; const [owner, repo] = process.env.GITHUB_REPOSITORY.split("/"); + const releases = await github.repos.listReleases({owner, repo}); const release = releases.data.find(r => r.tag_name === tagName); if (!release) throw new Error(`Tag ${tagName} not found. Did you make the GitHub release?`); + const oldAsset = release.assets.find(a => a.name === assetName); if (oldAsset) await github.repos.deleteReleaseAsset({owner, repo, asset_id: oldAsset.id}); + // (This is equivalent to actions/upload-release-asset. We're // already in a script, so might as well do it here.) const r = await github.repos.uploadReleaseAsset({ @@ -88,6 +93,7 @@ jobs: name: assetName, data: fs.readFileSync(assetName) }); + macOS: strategy: matrix: @@ -192,6 +198,7 @@ jobs: msys2do cp prebuild/Windows/binding.gyp binding.gyp msys2do node-gyp configure msys2do node-gyp rebuild -j 2 + - name: Bundle run: msys2do . prebuild/Windows/bundle.sh @@ -212,13 +219,16 @@ jobs: const assetName = "${{ steps.make_bundle.outputs.asset_name }}"; const tagName = process.env.UPLOAD_TO || process.env.CANVAS_VERSION_TO_BUILD; const [owner, repo] = process.env.GITHUB_REPOSITORY.split("/"); + const releases = await github.repos.listReleases({owner, repo}); const release = releases.data.find(r => r.tag_name === tagName); if (!release) throw new Error(`Tag ${tagName} not found. Did you make the GitHub release?`); + const oldAsset = release.assets.find(a => a.name === assetName); if (oldAsset) await github.repos.deleteReleaseAsset({owner, repo, asset_id: oldAsset.id}); + // (This is equivalent to actions/upload-release-asset. We're // already in a script, so might as well do it here.) const r = await github.repos.uploadReleaseAsset({