Skip to content

Commit

Permalink
Release the first file from the directory
Browse files Browse the repository at this point in the history
  • Loading branch information
rsdy committed May 15, 2022
1 parent ec09a30 commit f5abfcd
Showing 1 changed file with 15 additions and 8 deletions.
23 changes: 15 additions & 8 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -114,12 +114,19 @@ jobs:
for (dir of artifacts) {
console.log(`Uploading ${dir}/0s for release ${release_id}`);
await github.rest.repos.uploadReleaseAsset({
owner,
repo,
release_id,
name: path.basename(dir),
data: await fs.readFile(`bin/${dir}/0s`),
});
const files = await fs.readdir(`bin/${dir}`);
for (file of files) {
await github.rest.repos.uploadReleaseAsset({
owner,
repo,
release_id,
name: path.basename(dir),
data: await fs.readFile(`bin/${dir}/${file}`),
});
// only upload the first file
// there shouldn't be more anyway
break;
}
}

0 comments on commit f5abfcd

Please sign in to comment.