From d28a6399db437c8b58fd7e91370ea6900f2f11cd Mon Sep 17 00:00:00 2001 From: Alex Miller Date: Wed, 11 Sep 2024 13:35:12 +1200 Subject: [PATCH] Check dist has been updated for new builds --- .github/workflows/pull-request-verification.yml | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/.github/workflows/pull-request-verification.yml b/.github/workflows/pull-request-verification.yml index 8b906559..26118eba 100644 --- a/.github/workflows/pull-request-verification.yml +++ b/.github/workflows/pull-request-verification.yml @@ -13,11 +13,21 @@ jobs: build: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 + with: + fetch-depth: 0 # Need history for changelog generation - uses: volta-cli/action@v4 - run: | - pnpm install + pnpm i pnpm run all + # We need to make sure the checked-in `index.mjs` actually matches what we expect it to be. + - name: Compare the expected and actual dist/ directories + run: | + if [ "$(git diff --ignore-space-at-eol dist/ | wc -l)" -gt "0" ]; then + echo "Detected uncommitted changes after build. See status below:" + git diff + exit 1 + fi test-inline: runs-on: ubuntu-latest