GitHub Action to generate a text file asset containing all of the licenses for your production npm third-party dependencies.
Based on the npm package generate-licence-file.
To run the Action, supply your package.json path as input, and your desired output file as output.
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.
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: posixnpm install
npm run buildA 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.
generate-license-file-github-action is licensed under the ISC License.