From 5f78b0ad57baec8ae3545615c11d1c610ac84aff Mon Sep 17 00:00:00 2001 From: Ruben Gees Date: Mon, 26 Feb 2024 17:14:43 +0100 Subject: [PATCH] Run build in pre-push --- .github/workflows/ci.yml | 10 +++------- .husky/pre-push | 4 ++++ 2 files changed, 7 insertions(+), 7 deletions(-) create mode 100644 .husky/pre-push diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 112a4b0..a06dcfe 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -20,11 +20,7 @@ jobs: - run: pnpm install - run: pnpm verify + - run: pnpm build - - if: github.ref == 'refs/heads/main' - run: pnpm build - - - if: github.ref == 'refs/heads/main' - uses: stefanzweifel/git-auto-commit-action@v4 - with: - commit_message: Build + - name: Verify dist + run: git diff --exit-code dist/index.js diff --git a/.husky/pre-push b/.husky/pre-push new file mode 100644 index 0000000..d8ee5f9 --- /dev/null +++ b/.husky/pre-push @@ -0,0 +1,4 @@ +pnpm build + +git add dist +git diff --staged --quiet || git commit -m 'Build'