Skip to content

Commit

Permalink
Resolve await issue in release publish script
Browse files Browse the repository at this point in the history
  • Loading branch information
bobbah committed Jul 8, 2023
1 parent e7b23ad commit 93a189c
Showing 1 changed file with 12 additions and 10 deletions.
22 changes: 12 additions & 10 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,13 +48,15 @@ jobs:
});
const releaseRuntimes = ['linux-x64', 'win-x64'];
const projects = ['CentCom.API', 'CentCom.Server', 'CentCom.Exporter', 'CentCom.Bot'];
releaseRuntimes.forEach(rt => projects.forEach(proj => {
// Upload the release asset
await github.repos.uploadReleaseAsset({
owner: context.repo.owner,
repo: context.repo.repo,
release_id: release.data.id,
name: `publish/${proj}-${rt}.zip`,
data: await fs.readFileSync(`publish/${proj}-${rt}.zip`)
});
}));
for (rt of releaseRuntimes) {
for (proj of projects) {
// Upload the release asset
await github.repos.uploadReleaseAsset({
owner: context.repo.owner,
repo: context.repo.repo,
release_id: release.data.id,
name: `publish/${proj}-${rt}.zip`,
data: fs.readFileSync(`publish/${proj}-${rt}.zip`)
});
}
}

0 comments on commit 93a189c

Please sign in to comment.