Skip to content

Commit 3989e4b

Browse files
committed
document impl detail
1 parent 72e945e commit 3989e4b

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/github.ts

+3
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,9 @@ export const upload = async (
149149
const [owner, repo] = config.github_repository.split("/");
150150
const { name, size, mime, data: body } = asset(path);
151151
const currentAsset = currentAssets.find(
152+
// 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.
153+
// 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
154+
// see https://docs.github.com/en/rest/releases/assets?apiVersion=2022-11-28#upload-a-release-asset
152155
({ name: currentName }) => currentName == name.replace(" ", ".")
153156
);
154157
if (currentAsset) {

0 commit comments

Comments
 (0)