Skip to content

Commit

Permalink
chore: daily development
Browse files Browse the repository at this point in the history
  • Loading branch information
zhangtao25 committed Dec 10, 2024
1 parent f9d52e1 commit a6b03fb
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions .github/workflows/publish-babel-plugin-canyon.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,20 @@ jobs:
node-version: 20
registry-url: https://registry.npmjs.org/
- run: pnpm install
- run: pnpm --filter=babel-plugin-canyon publish -f --no-git-checks --access=public --filter
- run: |
# 获取当前的版本号
VERSION=$(jq -r '.version' package.json)
# 检查该版本是否已经发布
if npm show babel-plugin-canyon@$VERSION; then
echo "Version $VERSION already published. Skipping publish."
else
pnpm --filter=babel-plugin-canyon publish -f --no-git-checks --access=public
fi
env:
NODE_AUTH_TOKEN: ${{secrets.NODE_AUTH_TOKEN}}
- run: |
pnpm dist-tag add [email protected] latest
# 如果发布成功,则添加 dist-tag
VERSION=$(jq -r '.version' package.json)
pnpm dist-tag add babel-plugin-canyon@$VERSION latest
env:
NODE_AUTH_TOKEN: ${{secrets.NODE_AUTH_TOKEN}}

0 comments on commit a6b03fb

Please sign in to comment.