File tree Expand file tree Collapse file tree 2 files changed +171
-12
lines changed Expand file tree Collapse file tree 2 files changed +171
-12
lines changed Original file line number Diff line number Diff line change 66
77env :
88 CPU_CORES : 2
9- HUSKY : 1
10- HUSKY_DEBUG : 1
9+ HUSKY : 0
1110
1211jobs :
1312 release :
@@ -35,22 +34,36 @@ jobs:
3534# run: npm run test
3635 - name : Version bump & GitHub release
3736 run : |
38- # Sync lockfile before commit
39- npx husky
40- echo -e 'npm install\ngit add package-lock.json' > .husky/pre-commit
41- chmod +x .husky/pre-commit
42-
43- # Change version + release commit + push
4437 git config user.email "[email protected] " 4538 git config user.name "swagger-bot"
46- CI='' npx lerna version prerelease --preid beta --no-private --yes --force-publish
39+ npx lerna version prerelease --preid beta --no-private --yes --force-publish
4740 env :
4841 GH_TOKEN : ${{ secrets.SWAGGER_BOT_GITHUB_TOKEN }}
4942 NODE_AUTH_TOKEN : ${{ secrets.NPM_TOKEN }}
5043 - name : Publish monorepo npm packages
51- run : |
52- git checkout -- .husky/pre-commit
53- CI='' npx lerna publish from-package --no-private --yes
44+ run : npx lerna publish from-package --no-private --yes
5445 env :
5546 NODE_AUTH_TOKEN : ${{ secrets.NPM_TOKEN }}
5647
48+ sync-lockfile :
49+ name : Sync lockfile
50+ runs-on : ubuntu-latest
51+ needs : release
52+
53+ steps :
54+ - name : Checkout
55+ uses : actions/checkout@v4
56+ with :
57+ fetch-depth : 0
58+ token : ${{ secrets.SWAGGER_BOT_GITHUB_TOKEN }}
59+ - name : Setup Node.js
60+ uses : actions/setup-node@v4
61+ with :
62+ node-version : 22.14.0
63+ registry-url : https://registry.npmjs.org
64+ - name : Sync lockfile
65+ run : |
66+ npm install
67+ git add package-lock.json
68+ git diff --quiet || git commit -m "chore: sync lockfile"
69+ git push origin main
You can’t perform that action at this time.
0 commit comments