upload-release-action: Can't get file_glob to work
Hi!
Thanks a lot for this action, it’s very useful. I’m not sure if this is a bug or I’m doing something wrong.
Here’s (part of) my workflow:
build-appimage-linux:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- name: Build AppImage
run: ./packaging/linux/build_appimage.sh
- name: Upload AppImage to Release
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: ./dist/*.AppImage
file_glob: true
overwrite: true
tag: ${{ github.ref }}
build-windows-packages:
runs-on: windows-2019
steps:
- uses: actions/checkout@v2
- name: Build packages
run: ./build.bat --package
- name: Upload installer to Release
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: dist\*.msi
file_glob: true
overwrite: true
tag: ${{ github.ref }}
- name: Upload portable package to Release
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: dist\*.zip
file_glob: true
overwrite: true
tag: ${{ github.ref }}
I have two jobs, one for Windows, the other for Linux. However file_glob doesn’t work for either:
1s
Run svenstaro/upload-release-action@v2
with:
repo_token: ***
file: ./dist/*.AppImage
file_glob: true
overwrite: true
tag: refs/tags/vsdfkllsdkfgf_companion
Error: No files matching the glob pattern found.
Run svenstaro/upload-release-action@v2
with:
repo_token: ***
file: dist\*.msi
file_glob: true
overwrite: true
tag: refs/tags/vsdfkllsdkfgf_companion
Error: No files matching the glob pattern found.
The working directory is definitely set correctly (because the build script themselves can be found), and the dist directory definitely exists. What am I doing wrong?
My current workaround is to use full paths, which does work:
build-appimage-linux:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- name: Build AppImage
run: |
source ./packaging/linux/build_appimage.sh
echo "APPIMAGE_FULL_PATH=$_APPIMAGE_FILENAME" >> $GITHUB_ENV
- name: Upload AppImage to Release
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: ${{ env.APPIMAGE_FULL_PATH }}
overwrite: true
tag: ${{ github.ref }}
build-windows-packages:
runs-on: windows-2019
steps:
- uses: actions/checkout@v2
- name: Build packages
run: |
./build.bat --package
$WIN_INSTALLER_FULL_PATH = (Get-ChildItem -Path dist -Filter "*.msi").Fullname
$WIN_PORTABLE_FULL_PATH = (Get-ChildItem -Path dist -Filter "*.zip").Fullname
echo "WIN_INSTALLER_FULL_PATH=$WIN_INSTALLER_FULL_PATH" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
echo "WIN_PORTABLE_FULL_PATH=$WIN_PORTABLE_FULL_PATH" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
- name: Upload installer to Release
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: ${{ env.WIN_INSTALLER_FULL_PATH }}
overwrite: true
tag: ${{ github.ref }}
- name: Upload portable package to Release
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: ${{ env.WIN_PORTABLE_FULL_PATH }}
overwrite: true
tag: ${{ github.ref }}
About this issue
- Original URL
- State: open
- Created 4 years ago
- Reactions: 1
- Comments: 16 (3 by maintainers)
I think it’s good as is, maybe add a warning that the glob pattern has to use / even on windows