Skip to content

Commit

Permalink
chore: remove output
Browse files Browse the repository at this point in the history
  • Loading branch information
vimtor committed Mar 21, 2020
1 parent 84a556c commit 345143f
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 4 deletions.
14 changes: 14 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,3 +47,17 @@ Whether to add subdirectories to simply zip all files to the root.

- **Required:** No
- **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.
5 changes: 5 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,15 @@ inputs:
required: true
dest:
description: "Name of output zip file"
required: false
default: "result.zip"
recursive:
description: "Whether to add subdirectories to simply zip all files to the root"
required: false
default: true
branding:
icon: "package"
color: "red"
runs:
using: "node12"
main: "dist/index.js"
2 changes: 0 additions & 2 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,6 @@ zip.writeZip(destPath);

console.log(`\nZipped file ${dest} successfully`);

core.setOutput(destPath);


/***/ }),

Expand Down
2 changes: 0 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,5 +38,3 @@ const destPath = path.join(process.env.GITHUB_WORKSPACE, dest);
zip.writeZip(destPath);

console.log(`\nZipped file ${dest} successfully`);

core.setOutput(destPath);

0 comments on commit 345143f

Please sign in to comment.