Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tilde in filename gets substituted #159

Open
tobwen opened this issue Sep 19, 2021 · 9 comments
Open

Tilde in filename gets substituted #159

tobwen opened this issue Sep 19, 2021 · 9 comments

Comments

@tobwen
Copy link

tobwen commented Sep 19, 2021

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?

@movermeyer
Copy link

movermeyer commented Oct 22, 2021

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

@benalexau
Copy link

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.

@oblivioncth
Copy link

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. :/

@maggie44
Copy link

maggie44 commented Feb 1, 2023

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?

@MacDada
Copy link

MacDada commented Jun 14, 2023

Perhaps also spaces?

Yeah, I'm also surprised that my spaces get converted to dots -> destroying the file names………

@parnaudd
Copy link

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

@kid1412621
Copy link

Same here with parentheses. Is this GitHub restriction?

@softprops
Copy link
Owner

This was noted in a recent pull request that relaxed the handling of names with spaces #446 (comment)

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.

@softprops
Copy link
Owner

softprops commented May 9, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants