-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a6755b8
commit aa061e5
Showing
1 changed file
with
2 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,20 +17,10 @@ jobs: | |
node-version: 20 | ||
registry-url: https://registry.npmjs.org/ | ||
- run: pnpm install | ||
- 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 | ||
- run: pnpm --filter=babel-plugin-canyon publish -f --no-git-checks --access=public --filter | ||
env: | ||
NODE_AUTH_TOKEN: ${{secrets.NODE_AUTH_TOKEN}} | ||
- run: | | ||
# 如果发布成功,则添加 dist-tag | ||
VERSION=$(jq -r '.version' package.json) | ||
pnpm dist-tag add babel-plugin-canyon@$VERSION latest | ||
pnpm dist-tag add [email protected] latest | ||
env: | ||
NODE_AUTH_TOKEN: ${{secrets.NODE_AUTH_TOKEN}} |