ci: 修改publish代码
All checks were successful
/ release (push) Successful in 21s

This commit is contained in:
zhaoyingbo 2024-08-19 03:09:12 +00:00
parent cf508c9949
commit 002a2ce156

View File

@ -10,6 +10,8 @@ jobs:
steps:
- name: Checkout repository
uses: actions/checkout@v2
with:
fetch-depth: 5
- name: Set up Node.js
uses: actions/setup-node@v2
@ -19,15 +21,16 @@ jobs:
- name: Install dependencies
run: npm install
- name: Publish packages
id: publish_packages
run: |
git update-index --assume-unchanged .npmrc
echo "//git.yingbo.im:333/api/packages/zhaoyingbo/npm/:_authToken=${{ secrets.NPM_TOKEN }}" >> .npmrc
npx lerna publish from-git --yes --no-private
- name: Push tags to repository
- name: Bump version and push tag
id: bump_version
run: |
git config --global user.name 'zhaoyingbo'
git config --global user.email 'zhaoyingbo@live.cn'
npx lerna version --yes
git push --follow-tags
- name: Publish packages
run: |
git update-index --assume-unchanged .npmrc
echo "//git.yingbo.im:333/api/packages/zhaoyingbo/npm/:_authToken=${{ secrets.NPM_TOKEN }}" >> .npmrc
npx lerna publish from-package --yes