Skip to content

Commit

Permalink
chore: skip pre-commit hooks when creating a release
Browse files Browse the repository at this point in the history
  • Loading branch information
carlmw committed Feb 27, 2024
1 parent 468d0e1 commit f6ea1f0
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
2 changes: 2 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,6 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
HUSKY: 0
CI: true
run: npx semantic-release
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
"build-storybook": "storybook build",
"prepare": "husky install",
"prepublishOnly": "./scripts/prepublish.sh",
"postpublish": "./scripts/postpublish.sh",
"publish:local": "npm run build && yalc publish --no-scripts"
},
"author": "",
Expand Down
5 changes: 5 additions & 0 deletions scripts/prepublish.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@

echo "pre-publish"

if [ "$CI" = "true" ]; then
echo "Skipping pre-publish checks on CI"
exit 0
fi;

branch="$(git rev-parse --abbrev-ref HEAD)"

if [ "$branch" != "main" ]; then
Expand Down

0 comments on commit f6ea1f0

Please sign in to comment.