Skip to content

Commit

Permalink
ci: update to husky 8.0.3 and reactivate hook
Browse files Browse the repository at this point in the history
  • Loading branch information
MikeMcC399 committed Mar 17, 2023
1 parent e77704d commit 11a0ea4
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 15 deletions.
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",
"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 @@ -46,16 +47,11 @@
"devDependencies": {
"@types/node": "18.15.3",
"@vercel/ncc": "0.36.1",
"husky": "7.0.4",
"husky": "8.0.3",
"markdown-link-check": "3.10.3",
"prettier": "2.8.4"
},
"publishConfig": {
"access": "public"
},
"husky": {
"hooks": {
"pre-commit": "npm run format && npm run build && git add index.js dist"
}
}
}

0 comments on commit 11a0ea4

Please sign in to comment.