Skip to content

Commit

Permalink
copy checksums together with file
Browse files Browse the repository at this point in the history
  • Loading branch information
petar committed Dec 6, 2021
1 parent 907ea52 commit 878e1dc
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion .github/workflows/sync-release-assets.yml
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ jobs:
for (const file of missing_files) {
hash_sha = file + ".sha512"
hash_cid = file + ".cid"
// if didt.ipfs.io does not have both hash checksums for the file, skip this file
// if dist.ipfs.io does not have both hash checksums for the file, skip this file
if (!dist_assets_map[hash_sha] || !dist_assets_map[hash_cid]) {
console.log("skipping", file, "as dist.ipfs.io does not provide a checksum")
continue
Expand Down Expand Up @@ -171,6 +171,20 @@ jobs:
name: hash_cid,
data: await cid_data,
})
await github.repos.uploadReleaseAsset({
owner: context.repo.owner,
repo: context.repo.repo,
release_id: release.id,
name: hash_sha,
data: sha_data,
})
await github.repos.uploadReleaseAsset({
owner: context.repo.owner,
repo: context.repo.repo,
release_id: release.id,
name: hash_cid,
data: cid_data,
})
}
// summary of assets on both sides
release_assets.push({ tag: release.tag_name, github_assets: github_assets, dist_assets: dist_assets_list })
Expand Down

0 comments on commit 878e1dc

Please sign in to comment.