mirror of
https://github.com/papeloto/action-zip
synced 2024-11-26 07:08:25 -08:00
docs: usage and inputs
This commit is contained in:
parent
6842a4f571
commit
84a556cb4e
2 changed files with 51 additions and 4 deletions
49
README.md
49
README.md
|
@ -1,2 +1,49 @@
|
||||||
# action-zip
|
# action-zip
|
||||||
Action for zipping files easily
|
|
||||||
|
> Action for zipping files easily
|
||||||
|
|
||||||
|
## Usage
|
||||||
|
|
||||||
|
The only requirement is to use the official `actions/checkout@v2` first so the zip action has access to the repo files.
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
name: Zip Files
|
||||||
|
|
||||||
|
on:
|
||||||
|
release:
|
||||||
|
types: [published]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
zip-files:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
- uses: papeloto/action-zip@v1
|
||||||
|
with:
|
||||||
|
files: dist/ manifest.json
|
||||||
|
dest: result.zip
|
||||||
|
```
|
||||||
|
|
||||||
|
In this example, after a release is published, a new file named `result.zip` will be created with both the file `manifest.json` and the folder `dist` (files included).
|
||||||
|
|
||||||
|
## Inputs
|
||||||
|
|
||||||
|
#### `files`
|
||||||
|
|
||||||
|
Files or directories to zip.
|
||||||
|
|
||||||
|
- **Required:** Yes
|
||||||
|
|
||||||
|
#### `dest`
|
||||||
|
|
||||||
|
Name of the output zip file.
|
||||||
|
|
||||||
|
- **Required:** No
|
||||||
|
- **Default:** result.zip
|
||||||
|
|
||||||
|
#### `recursive`
|
||||||
|
|
||||||
|
Whether to add subdirectories to simply zip all files to the root.
|
||||||
|
|
||||||
|
- **Required:** No
|
||||||
|
- **Default:** true
|
||||||
|
|
|
@ -1,15 +1,15 @@
|
||||||
name: "Zip Files"
|
name: "Zip Files"
|
||||||
description: "Action for zipping files easily"
|
description: "Action for zipping files easily"
|
||||||
inputs:
|
inputs:
|
||||||
github-token:
|
|
||||||
description: "GitHub Token"
|
|
||||||
required: true
|
|
||||||
files:
|
files:
|
||||||
description: "Files or directories to zip"
|
description: "Files or directories to zip"
|
||||||
required: true
|
required: true
|
||||||
dest:
|
dest:
|
||||||
description: "Name of output zip file"
|
description: "Name of output zip file"
|
||||||
default: "result.zip"
|
default: "result.zip"
|
||||||
|
recursive:
|
||||||
|
description: "Whether to add subdirectories to simply zip all files to the root"
|
||||||
|
default: true
|
||||||
runs:
|
runs:
|
||||||
using: "node12"
|
using: "node12"
|
||||||
main: "dist/index.js"
|
main: "dist/index.js"
|
||||||
|
|
Loading…
Reference in a new issue