ci: 修改publish代码

This commit is contained in:
zhaoyingbo 2024-08-19 03:00:56 +00:00
parent aa2d511f85
commit 16730def75

View File

@ -1,7 +1,6 @@
on:
push:
branches:
- master
push:
branches:
- master
jobs:
release:
@ -19,16 +18,15 @@ jobs:
- name: Install dependencies
run: npm install
- 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 patch --yes
git push --follow-tags
- 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-package --yes --no-private
npx lerna publish from-git --yes --no-private
- name: Push tags to repository
run: |
git config --global user.name 'zhaoyingbo'
git config --global user.email 'zhaoyingbo@live.cn'
git push --follow-tags