Skip to content

Commit 0f098db

Browse files
committed
ci: skipping husky in gh actions
1 parent 551991a commit 0f098db

File tree

3 files changed

+10
-1
lines changed

3 files changed

+10
-1
lines changed

.github/workflows/release.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
name: Release Please
22

3+
env:
4+
HUSKY: 0
5+
36
on:
47
push:
58
branches:

.husky/install.mjs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
// Skip Husky install in production and CI
2+
if (process.env.NODE_ENV === 'production' || process.env.CI === 'true') {
3+
process.exit(0)
4+
}
5+
const husky = (await import('husky')).default
6+
console.log(husky())

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,6 @@
4646
"husky": "^9.1.7"
4747
},
4848
"scripts": {
49-
"prepare": "husky"
49+
"prepare": "node .husky/install.mjs"
5050
}
5151
}

0 commit comments

Comments
 (0)