File tree Expand file tree Collapse file tree 1 file changed +17
-4
lines changed Expand file tree Collapse file tree 1 file changed +17
-4
lines changed Original file line number Diff line number Diff line change @@ -55,10 +55,23 @@ runs:
5555 if : ${{ inputs.sign_native == 'true' }}
5656 shell : bash
5757 run : |
58- FILENAMES="build-*/**/*.tar.gz"
59- if [[ $FILENAMES =~ '*' ]]; then
60- FILENAMES=$(ls $FILENAMES | sed -e ':a' -e 'N' -e '$!ba' -e 's/\n/ /g')
61- fi
58+ cat << EOF > script.js
59+ const { readdirSync } = require('fs');
60+ const { join } = require('path');
61+
62+ const tarFiles = readdirSync(process.argv[2], {
63+ withFileTypes: true,
64+ recursive: true
65+ })
66+ .filter(dirEnt => dirEnt.isFile())
67+ .map(({ name, parentPath }) => join(parentPath, name))
68+ .filter(file => file.includes('build-') && file.includes('.tar.gz'));
69+
70+ process.stdout.write(tarFiles.join('\n'));
71+ process.stdout.write('\n')
72+ EOF
73+
74+ FILENAMES=$(node ./script.js .)
6275 FILENAMES="$FILENAMES ${{ env.package_file }}"
6376 echo "FILES_TO_SIGN=${FILENAMES}" >> "$GITHUB_ENV"
6477
You can’t perform that action at this time.
0 commit comments