Skip to content

Commit

Permalink
chore: 🤖 fix
Browse files Browse the repository at this point in the history
  • Loading branch information
hijiki51 committed Aug 25, 2023
1 parent c643f68 commit 3680327
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions .github/workflows/draft.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,14 @@ jobs:
repo: context.repo.repo
});
core.info(Object.entries(latest));
core.info(Object.entries(latest.data));
if (!latest.assets || latest.assets.length === 0) {
if (!latest.data.assets || latest.data.assets.length === 0) {
console.log("No assets found in latest release");
return;
}
const assets = latest.assets;
const assets = latest.data.assets;
const draft = await github.rest.repos.createRelease({
owner: context.repo.owner,
Expand All @@ -44,6 +44,8 @@ jobs:
draft: true
});
core.info(Object.entries(draft.data));
for (const asset of assets) {
if (asset.browser_download_url.includes("releases/download")) {
// download data
Expand All @@ -60,7 +62,7 @@ jobs:
const upload = await github.rest.repos.uploadReleaseAsset({
owner: context.repo.owner,
repo: context.repo.repo,
release_id: draft.id,
release_id: draft.data.id,
name: asset.name,
data: download.data,
headers: {
Expand Down

0 comments on commit 3680327

Please sign in to comment.