diff --git a/.github/workflows/check-licenses.yml b/.github/workflows/check-licenses.yml new file mode 100644 index 0000000..2db3f0e --- /dev/null +++ b/.github/workflows/check-licenses.yml @@ -0,0 +1,24 @@ +name: Check Licenses +on: + push: + branches: ["main"] + pull_request: + branches: ["*"] + +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: true + +jobs: + check_licenses: + name: Check Licenses + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Base Setup + uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1 + + - name: Check Licenses + run: yarn check-licenses + diff --git a/package.json b/package.json index 6fa49d5..964568c 100644 --- a/package.json +++ b/package.json @@ -36,6 +36,7 @@ "build:labextension:dev": "jupyter labextension build --development True .", "build:lib": "tsc --sourceMap", "build:lib:prod": "tsc", + "check-licenses": "npx license-checker-rseidelsohn --onlyAllow 'MIT;Apache-2.0;BSD-2-Clause;BSD-3-Clause;ISC;0BSD;CC0-1.0;Python-2.0;CC-BY-3.0;CC-BY-4.0;Unlicense;BlueOak-1.0.0;(MIT OR Apache-2.0);(MIT AND BSD-3-Clause);(Apache-2.0 OR MIT);(BSD-2-Clause OR MIT OR Apache-2.0);(MIT OR CC0-1.0);(MIT AND CC-BY-3.0);(Unlicense OR Apache-2.0)'", "clean": "jlpm clean:lib", "clean:lib": "rimraf lib tsconfig.tsbuildinfo", "clean:lintcache": "rimraf .eslintcache .stylelintcache",