Skip to content

Commit

Permalink
fix: asset upload (#1962)
Browse files Browse the repository at this point in the history
* fix: asset upload

* test: upload-asset.js

* test: upload-asset.js

* test: upload-asset.js

* test: upload-asset.js

* test: upload-asset.js
  • Loading branch information
nmerget authored Dec 5, 2023
1 parent 8f3dc93 commit c5525d4
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions .github/scripts/release/upload-asset.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ const uploadAsset = async ({
release_id
});

const foundAsset = uploadRelease?.assets?.find(
(asset) => asset.name === assetName
);
const { assets = [] } = uploadRelease.data;

const foundAsset = assets?.find((asset) => asset.name === assetName);

if (foundAsset) {
await github.rest.repos.deleteReleaseAsset({
Expand Down

0 comments on commit c5525d4

Please sign in to comment.