chore: remove output

This commit is contained in:
papeloto 2020-03-21 16:11:51 +01:00
parent 84a556cb4e
commit 345143f1ea
4 changed files with 19 additions and 4 deletions

View file

@ -47,3 +47,17 @@ Whether to add subdirectories to simply zip all files to the root.
- **Required:** No - **Required:** No
- **Default:** true - **Default:** true
If for example, you do the following:
```yaml
- uses: papeloto/action-zip@v1
with:
files: dist/ manifest.json
recursive: false
dest: result.zip
```
All the files inside the `dist` folder will be added at the root of the zip along with `manifest.json`. By contrast, if `recursive: true` (by default), the folder `dist` is included.
Also if you want a nested file at the root, `recursive: false` is your guy.

View file

@ -6,10 +6,15 @@ inputs:
required: true required: true
dest: dest:
description: "Name of output zip file" description: "Name of output zip file"
required: false
default: "result.zip" default: "result.zip"
recursive: recursive:
description: "Whether to add subdirectories to simply zip all files to the root" description: "Whether to add subdirectories to simply zip all files to the root"
required: false
default: true default: true
branding:
icon: "package"
color: "red"
runs: runs:
using: "node12" using: "node12"
main: "dist/index.js" main: "dist/index.js"

2
dist/index.js vendored
View file

@ -94,8 +94,6 @@ zip.writeZip(destPath);
console.log(`\nZipped file ${dest} successfully`); console.log(`\nZipped file ${dest} successfully`);
core.setOutput(destPath);
/***/ }), /***/ }),

View file

@ -38,5 +38,3 @@ const destPath = path.join(process.env.GITHUB_WORKSPACE, dest);
zip.writeZip(destPath); zip.writeZip(destPath);
console.log(`\nZipped file ${dest} successfully`); console.log(`\nZipped file ${dest} successfully`);
core.setOutput(destPath);