Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: skip pre-commit hooks when creating a release #121

Merged
merged 1 commit into from
Feb 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
carlmw marked this conversation as resolved.
Show resolved Hide resolved
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",
carlmw marked this conversation as resolved.
Show resolved Hide resolved
"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
carlmw marked this conversation as resolved.
Show resolved Hide resolved
echo "Skipping pre-publish checks on CI"
exit 0
fi;

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

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