From efda0e74123b0a877c582571a410b0a773367934 Mon Sep 17 00:00:00 2001 From: Sven-Hendrik Haase Date: Fri, 3 Jul 2020 06:05:26 +0200 Subject: [PATCH] Sigh give up and use node-fetch --- .github/workflows/ci.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 94ac87b..6d5643a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -30,19 +30,21 @@ jobs: asset_name: TEST.md tag: ci-test-${{ matrix.os }} overwrite: true + - run: npm install node-fetch - name: Check that the uploaded asset is readable uses: actions/github-script@v2 with: github-token: ${{ secrets.GITHUB_TOKEN }} script: | const fs = require('fs') + const fetch = require('node-fetch'); + const expected = fs.readFileSync("README.md") const release = await github.repos.getReleaseByTag({ ...context.repo, tag: "ci-test-${{ matrix.os }}", }) - github.auth = undefined; - const actual = await github.request(release.data.assets[0].browser_download_url) + const actual = await fetch(release.data.assets[0].browser_download_url).text() const assert = require('assert').strict; assert.equal(expected, actual) - name: Clean up