From f10b71a0f08de9232fbb6d34a779231c0f018eaa Mon Sep 17 00:00:00 2001 From: Carl Whittaker Date: Tue, 27 Feb 2024 14:58:19 +0000 Subject: [PATCH] chore: skip pre-commit hooks when creating a release --- .github/workflows/release.yml | 11 ++++++----- .github/workflows/verify.yml | 1 + package.json | 3 ++- scripts/prepublish.sh | 4 ++++ 4 files changed, 13 insertions(+), 6 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index a1638065..fdf4fb53 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,16 +1,15 @@ name: Release on: - workflow_run: - workflows: Verify - branches: main - types: completed + push: + branches: + - main + - next permissions: contents: read # for checkout jobs: release: - if: ${{ github.event.workflow_run.conclusion == 'success' }} name: Release runs-on: ubuntu-latest permissions: @@ -35,4 +34,6 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} NPM_TOKEN: ${{ secrets.NPM_TOKEN }} + HUSKY: 0 + CI: true run: npx semantic-release diff --git a/.github/workflows/verify.yml b/.github/workflows/verify.yml index 482c9cb0..6dbf1140 100644 --- a/.github/workflows/verify.yml +++ b/.github/workflows/verify.yml @@ -4,6 +4,7 @@ on: push: branches: - main + - next pull_request: types: [opened, synchronize, reopened] diff --git a/package.json b/package.json index 186c7cc7..6660ddca 100644 --- a/package.json +++ b/package.json @@ -102,7 +102,8 @@ "homepage": "https://github.com/oaknational/oak-components#readme", "release": { "branches": [ - "main" + "main", + "next" ], "plugins": [ "@semantic-release/commit-analyzer", diff --git a/scripts/prepublish.sh b/scripts/prepublish.sh index 0916529f..47746e9a 100755 --- a/scripts/prepublish.sh +++ b/scripts/prepublish.sh @@ -2,6 +2,10 @@ echo "pre-publish" +if ["$CI" = "true"]; then + echo "Skipping pre-publish checks on CI" +fi; + branch="$(git rev-parse --abbrev-ref HEAD)" if [ "$branch" != "main" ]; then