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

ci: update to husky 8.0.3 and reactivate hook #839

Merged
merged 1 commit into from
Mar 24, 2023
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
12 changes: 12 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

echo action source code is being reformatted and recompiled
npm run format
npm run build
if [ "$(git diff --ignore-space-at-eol dist/ | wc -l)" -gt "0" ]; then
echo
echo changes to action source code were detected
echo action source code changes are added to this commit
git add index.js src/ping.js dist
fi
16 changes: 8 additions & 8 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 3 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@
"build": "ncc build -o dist index.js",
"format": "prettier --write index.js src/ping.js",
"check:markdown": "find *.md docs/*.md -print0 | xargs -0 -n1 markdown-link-check -c md-linkcheck.json",
"update:cypress": "./scripts/update-cypress-latest.sh"
"update:cypress": "./scripts/update-cypress-latest.sh",
"prepare": "husky install"
},
"repository": {
"type": "git",
Expand Down Expand Up @@ -47,16 +48,11 @@
"devDependencies": {
"@types/node": "18.15.3",
"@vercel/ncc": "0.36.1",
"husky": "7.0.4",
"husky": "8.0.3",
"markdown-link-check": "3.11.0",
"prettier": "2.8.4"
},
"publishConfig": {
"access": "public"
},
"husky": {
"hooks": {
"pre-commit": "npm run format && npm run build && git add index.js dist"
}
}
}