Skip to content

Commit

Permalink
document impl detail
Browse files Browse the repository at this point in the history
  • Loading branch information
softprops committed May 6, 2024
1 parent 72e945e commit 3989e4b
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/github.ts
Expand Up @@ -149,6 +149,9 @@ export const upload = async (
const [owner, repo] = config.github_repository.split("/");
const { name, size, mime, data: body } = asset(path);
const currentAsset = currentAssets.find(
// note: GitHub renames asset filenames that have special characters, non-alphanumeric characters, and leading or trailing periods. The "List release assets" endpoint lists the renamed filenames.
// due to this renaming we need to be mindful when we compare the file name we're uploading with a name github may already have rewritten for logical comparison
// see https://docs.github.com/en/rest/releases/assets?apiVersion=2022-11-28#upload-a-release-asset
({ name: currentName }) => currentName == name.replace(" ", ".")
);
if (currentAsset) {
Expand Down

0 comments on commit 3989e4b

Please sign in to comment.