Skip to content

Commit

Permalink
fix(ci): dist.ipfs.io sync preserving binaries
Browse files Browse the repository at this point in the history
tar.gz got mangled because of reasons known to github,
this does the correct upload every time by forcing github to interpret
payload as an opaque stream of bytes without anything fancy
  • Loading branch information
lidel authored and aschmahmann committed Dec 6, 2021
1 parent 024e84a commit 7026952
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions .github/workflows/sync-release-assets.yml
Original file line number Diff line number Diff line change
Expand Up @@ -107,14 +107,17 @@ jobs:
for (const file of missing_files) {
console.log("fetching", file, "from dist.ipfs.io")
await exec.exec('ipfs', ['get', p + '/' + file])
const data = await fs.readFile(file, "binary")
console.log("uploading", file, "to github release", release.tag_name)
resp = await github.repos.uploadReleaseAsset({
owner: context.repo.owner,
repo: context.repo.repo,
release_id: release.id,
headers: {
"content-type": "application/octet-stream",
"content-length": `${(await fs.stat(file)).size}`
},
name: file,
data: data,
data: await fs.readFile(file),
})
}
// summary of assets on both sides
Expand Down

0 comments on commit 7026952

Please sign in to comment.