Merge branch 'master' of https://github.com/softprops/action-gh-release into feat/add-generateReleaseNotes

Signed-off-by: Rui Chen <rui@chenrui.dev>
This commit is contained in:
Rui Chen 2025-06-11 01:56:08 -04:00
commit cd2a4ea768
No known key found for this signature in database
GPG key ID: 6577287BDCA70840
7 changed files with 49 additions and 17 deletions

View file

@ -166,12 +166,19 @@ export const upload = async (
({ name: currentName }) => currentName == alignAssetName(name),
);
if (currentAsset) {
console.log(`♻️ Deleting previously uploaded asset ${name}...`);
await github.rest.repos.deleteReleaseAsset({
asset_id: currentAsset.id || 1,
owner,
repo,
});
if (config.input_overwrite_files === false) {
console.log(
`Asset ${name} already exists and overwrite_files is false...`,
);
return null;
} else {
console.log(`♻️ Deleting previously uploaded asset ${name}...`);
await github.rest.repos.deleteReleaseAsset({
asset_id: currentAsset.id || 1,
owner,
repo,
});
}
}
console.log(`⬆️ Uploading ${name}...`);
const endpoint = new URL(url);