github-release
github-release copied to clipboard
Spaces in file names cases upload step to not work.
Spaces in file names cases upload step to not work.
Config like this
- name: Release files - Ubuntu
if: startsWith(github.ref, 'refs/tags/') && matrix.os == 'ubuntu-latest'
uses: meeDamian/[email protected]
with:
token: ${{ secrets.GITHUB_TOKEN }}
gzip: false
files: >
dist_electron/*.AppImage
dist_electron/*.snap
dist_electron/latest*.yml
With files like this
total 261284
-rwxr-xr-x 1 runner docker 144196185 Mar 22 15:10 Product Name-2022.2.22.AppImage
-rw-r--r-- 1 runner docker 785 Mar 22 15:11 builder-debug.yml
-rw-r--r-- 1 runner docker 388 Mar 22 15:11 latest-linux.yml
drwxr-xr-x 5 runner docker 4096 Mar 22 15:09 linux-unpacked
-rw-r--r-- 1 runner docker 123338752 Mar 22 15:11 template-electron-vuex-vuetify_2022.2.22_amd64.snap
Generate error like this
Upload Assets
tar: dist_electron/Product: No such file or directory
tar: error exit delayed from previous errors
So after investigating this, it seems to be "a feature, not a bug" with SH (/bin/sh).
On the entrypoint.sh script, the files are evaluated within a loop:
for entry in $INPUT_FILES; do
This has the unfortunate outcome of splitting strings via spaces, BUT you can change the way it should split by updating the Internal Field Separator. So the solution is:
IFS='
' && for entry in $INPUT_FILES; do
Here's a POC @meeDamian
I have this PR (https://github.com/meeDamian/github-release/pull/36), but it looks like this action isn't actively maintained...