Just use curl

This commit is contained in:
Sven-Hendrik Haase 2020-07-03 06:20:03 +02:00
parent efda0e7412
commit c14556ae27
No known key found for this signature in database
GPG Key ID: 39E4B877E62EB915

View File

@ -30,21 +30,20 @@ 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 child_process = require('child_process');
const expected = fs.readFileSync("README.md")
const release = await github.repos.getReleaseByTag({
...context.repo,
tag: "ci-test-${{ matrix.os }}",
})
const actual = await fetch(release.data.assets[0].browser_download_url).text()
const actual = chdild_process.execSync(curl, [release.data.assets[0].browser_download_url])
const assert = require('assert').strict;
assert.equal(expected, actual)
- name: Clean up