action-gh-release
action-gh-release copied to clipboard
Tilde in filename gets substituted
issue
My filename looks like tobwen-1.1.0-1~buster_amd64.deb.
When releasing it, the filename gets renamed to tobwen-1.1.0-1.buster_amd64.deb.
remark
The tilde ~ is allowed on URLs and all major OS and filesystems, like Linux, macOS and Windows.
question
Is this a restriction of action-gh-release or ob github?
It seems to be a limitation of GitHub:
GitHub renames asset filenames that have special characters, non-alphanumeric characters, and leading or trailing periods. The "List assets for a release" endpoint lists the renamed filenames. For more information and help, contact GitHub Support.
https://docs.github.com/en/rest/reference/repos#upload-a-release-asset
I've found the same issue occurs with a colon (:) in a filename. It is also being substituted with a period (.), making GitHub Releases unsuitable for hosting Arch Linux repositories that define an epoch parameter in PKGBUILD.
My assests are also having parentheses substituted with periods, which I know go through fine with manual uploads. I'd be somewhat surprised if those were considered "special characters", though the "non-alphanumeric" portion of the docs do suggest that could be possible. If so its quite silly that the endpoint would have limitation that the site UI doesn't.
The documentation could really be more specific, it basically just tells you to contact support. :/
Perhaps also spaces? Files seem to get uploaded as artefacts with spaces in the titles (my title.exe) and then when downloading and running through the action comes out (my.title.exe). It's an accepted character by GitHub, any reason for the substitution?
Perhaps also spaces?
Yeah, I'm also surprised that my spaces get converted to dots -> destroying the file names………
Hi
I also faced this issue where space are replaced by dot. It's break many things on our side. An update for this is possible/planned ?
Thanks
Same here with parentheses. Is this GitHub restriction?
This was noted in a recent pull request that relaxed the handling of names with spaces https://github.com/softprops/action-gh-release/pull/446#discussion_r1591023630
GitHub doesn't expressly document which characters may get replaced in its documentation but it does document some.
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. For more information and help, contact GitHub Support.
One possible work around for now is to create an a archive whose name does not contain special characters that contains the file with special characters in its names and use that archive as the release asset. that allows your users to download a and then unpack a artifact containing files with names without GitHub's restrictions.