diff --git a/README.md b/README.md index 2ec7e15..cc7dd57 100644 --- a/README.md +++ b/README.md @@ -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. diff --git a/action.yml b/action.yml index 739efa1..d6f1a4d 100644 --- a/action.yml +++ b/action.yml @@ -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" diff --git a/dist/index.js b/dist/index.js index 9dff2d2..c3186db 100644 --- a/dist/index.js +++ b/dist/index.js @@ -94,8 +94,6 @@ zip.writeZip(destPath); console.log(`\nZipped file ${dest} successfully`); -core.setOutput(destPath); - /***/ }), diff --git a/index.js b/index.js index 2de54ca..abe16c2 100644 --- a/index.js +++ b/index.js @@ -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);