diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6d7a4c13afabea..9efecd516d165e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -90,3 +90,37 @@ jobs: with: token: ${{ secrets.GITHUB_TOKEN }} unchecked: '1,5069' + + check-license-lines: + name: Check licenses + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b + + - name: Get Changed Files + id: changed-files + uses: tj-actions/changed-files@6c44eb8294bb9c93d6118427f4ff8404b695e1d7 + + - name: Delete Unmodified Files + run: | + cd $GITHUB_WORKSPACE + mkdir all + shopt -s extglob dotglob + mv !(all) all + shopt -u dotglob + mkdir unchanged + cd all + for FILE in ${{ steps.changed-files.outputs.all_changed_files }}; do + [ -f ${FILE} ] && mkdir -p $(dirname "../unchanged/${FILE}") + [ -f ${FILE} ] && cp ${FILE} ../unchanged/${FILE} + done + cd .. + rm -rf all + cd unchanged + cp -r unchanged/* . + cd .. + rm -rf unchanged + + - name: Check License Lines + uses: kt3k/license_checker@d12a6d90c58e30fefed09f2c4d03ba57f4c673a8 diff --git a/.licenserc.json b/.licenserc.json new file mode 100644 index 00000000000000..cb3603df9e253d --- /dev/null +++ b/.licenserc.json @@ -0,0 +1,18 @@ +{ + "**/*.{sol}": "// SPDX-License-Identifier: CC0-1.0", + "ignore": [ + "assets/eip-712", + "assets/eip-3267", + "assets/eip-3475", + "assets/eip-3525", + "assets/eip-4361", + "assets/eip-4400", + "assets/eip-4519", + "assets/eip-4675", + "assets/eip-4886", + "assets/eip-4907", + "assets/eip-4987", + "assets/eip-5006", + "assets/eip-5007" + ] +}