From f40270699d57755fd31b02854b11354dda13cde7 Mon Sep 17 00:00:00 2001 From: Johannes Schindelin Date: Sun, 21 Mar 2021 02:04:01 +0100 Subject: [PATCH] Add a workflow to verify that dist/ is up to date Signed-off-by: Johannes Schindelin --- .github/workflows/verify-dist.yml | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 .github/workflows/verify-dist.yml diff --git a/.github/workflows/verify-dist.yml b/.github/workflows/verify-dist.yml new file mode 100644 index 0000000..4268b60 --- /dev/null +++ b/.github/workflows/verify-dist.yml @@ -0,0 +1,26 @@ +name: Verify that dist is compiled + +on: + push: + branches: [ main ] + pull_request: + branches: [ main ] + +jobs: + build: + name: Build + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - run: npm ci + - run: npm run lint + - run: npm run prepare + - name: Verify that `dist/index.js` is up to date + shell: bash + run: | + # `ncc` might produce output with mixed line endings + test -z "$(git diff -w HEAD | tee diff.txt)" || { + echo 'Files changed after `npm run package`' + cat diff.txt + exit 1 + }