softprops / action-gh-release

📦 :octocat: GitHub Action for creating GitHub Releases
MIT License
3.85k stars 434 forks source link

fix: support space in file name #446

Closed MystiPanda closed 2 months ago

MystiPanda commented 2 months ago

According to this issue comment, GitHub will rename the asset, which causes the name-based check to fail for file names containing spaces. We can change the file name to the same as GitHub before checking to solve this problem.

softprops commented 2 months ago

thanks for looking into this @MystiPanda. nice catch

MystiPanda commented 2 months ago

Yes, I noticed what the documentation said, I initially wanted to use a regex to match all the special characters the documentation said, but I didn't find this character list in the documentation, so I just replace space which is most common.

MystiPanda commented 2 months ago

I think I've got something here. It seems that all characters except letters, numbers and @ - _ + are not supported, and consecutive unsupported characters will be replaced with a ., so simple space replacement may have problems, If a txt file is named with unsupported characters except for the extension, GitHub will rename it to default.txt

softprops commented 2 months ago

thanks. we can expand this list as we go. just a heads up, your changes have been incorporated into the v2 which now includes these changes