Skip to content

Commit a8b3c2c

Browse files
committed
fix(release): clean working directory before publish
1 parent c0f36e3 commit a8b3c2c

File tree

3 files changed

+151
-4
lines changed

3 files changed

+151
-4
lines changed

.github/workflows/release.yml

+4-2
Original file line numberDiff line numberDiff line change
@@ -39,15 +39,17 @@ jobs:
3939
npx husky
4040
echo -e 'npm install\ngit add package-lock.json' > .husky/pre-commit
4141
chmod +x .husky/pre-commit
42-
42+
# Change version + release commit + push
4343
git config user.email "swagger-bot@smartbear.com"
4444
git config user.name "swagger-bot"
4545
npx lerna version prerelease --preid beta --no-private --yes --force-publish
4646
env:
4747
GH_TOKEN: ${{ secrets.SWAGGER_BOT_GITHUB_TOKEN }}
4848
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
4949
- name: Publish monorepo npm packages
50-
run: npx lerna publish from-package --no-private --yes
50+
run: |
51+
git checkout -- .husky/pre-commit
52+
npx lerna publish from-package --no-private --yes
5153
env:
5254
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
5355

lerna.json

+1-2
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,7 @@
1515
"ignoreChanges": ["**/test/**"]
1616
},
1717
"publish": {
18-
"registry": "https://registry.npmjs.org",
19-
"ignoreChanges": [".husky/**"]
18+
"registry": "https://registry.npmjs.org"
2019
}
2120
},
2221
"$schema": "node_modules/lerna/schemas/lerna-schema.json"

package-lock.json

+146
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)