From 780d4e34ef9c231e8a31c0d65b326ae5c62944b7 Mon Sep 17 00:00:00 2001 From: Toby Smith Date: Sun, 20 Feb 2022 16:55:24 +0000 Subject: [PATCH] Update Readme --- LICENSE.md | 2 +- README.md | 61 +++++++++++++++++++++++++++++++++++++++++++++++++++++- 2 files changed, 61 insertions(+), 2 deletions(-) diff --git a/LICENSE.md b/LICENSE.md index 635a319..d28de90 100644 --- a/LICENSE.md +++ b/LICENSE.md @@ -1,4 +1,4 @@ -Copyright (c) 2021, Toby Bessant & Toby Smith +Copyright (c) 2022, Toby Bessant & Toby Smith Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above diff --git a/README.md b/README.md index ff0623c..f9c0a58 100644 --- a/README.md +++ b/README.md @@ -1 +1,60 @@ -generate-license-file-github-action +# generate-license-file GitHub Action + +GitHub Action to generate a text file asset containing all of the licenses for your production npm third-party dependencies. + +

+ + GitHub release (latest by date) + + + + +

+ +Based on the npm package [generate-licence-file](https://www.npmjs.com/package/generate-license-file). + +## Usage + +To run the Action, supply your package.json path as `input`, and your desired output file as `output`. + +```yaml +jobs: + myJob: + steps: + - uses: actions/checkout@v2 + + - uses: generate-licence-file@latest + name: Generate License File + with: + input: "./package.json" + output: "./third-party-licenses.txt" +``` + +You can also specify which line ending you would like it to use, either `windows` for ` crlf` or `posix` for `lf`. If you don't supply one it will use the build agents default. + +```yaml +jobs: + myJob: + steps: + - uses: actions/checkout@v2 + + - uses: generate-licence-file@latest + name: Generate License File + with: + input: "./package.json" + output: "./third-party-licenses.txt" + lineEnding: posix +``` + +## Building the action yourself + +```bash +npm install +npm run build +``` + +A Husky pre-commit hook will automatically build and commit the dist directory on each commit to ensure that the committed JavaScript code is always up to date. + +## License + +generate-license-file-github-action is licensed under the [ISC License](./LICENSE.md).