Skip to content

Latest commit

 

History

History
60 lines (45 loc) · 1.85 KB

File metadata and controls

60 lines (45 loc) · 1.85 KB

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.

Usage

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: posix

Building the action yourself

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.