dsaltares / fetch-gh-release-asset

Github Action to download an asset from a Github release
MIT License
113 stars 70 forks source link

If no file is given, download all assets #54

Open lumpidu opened 1 year ago

lumpidu commented 1 year ago

The error is somewhat misleading, if no file: key is given:

/home/runner/work/_actions/dsaltares/fetch-gh-release-asset/master/dist/index.js:2050
        throw new Error(`Input required and not supplied: ${name}`);

I rather supposed that all files would be downloaded in that case. I know that the Readme states that this parameter is required, but leaving it out would be the most intuitive way to say: download all files from a release. Or do you have a better proposal ?

dsaltares commented 1 year ago

I think the README is pretty clear saying the option is required although I understand you may want to download all files. You can achieve that by enabling the regex option and passing a regex to file that will accept all possible file names: .*.

In any case, I will leave this issue open as an enhacement to make file optional and have the behaviour you described.