Skip to content

Commit

Permalink
🐎 ci: release workflow test
Browse files Browse the repository at this point in the history
  • Loading branch information
kiccer committed Apr 7, 2024
1 parent 8dbdcba commit b401e3a
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions .github/workflows/master_push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,19 +53,18 @@ jobs:
fi
- name: 创建 tag
if: steps.check-tag.outputs.exists == 'false'
if: ${{ steps.check-tag.outputs.exists == 'false' }}
run: git tag v${{ steps.package-version.outputs.version }} && git push --tags

- name: 发布 Release
# 判断是否已经发布过此版本
if: steps.check-tag.outputs.exists == 'false'
if: ${{ steps.check-tag.outputs.exists == 'false' }}
uses: softprops/action-gh-release@v2
with:
name: v${{ steps.package-version.outputs.version }}
tag_name: v${{ steps.package-version.outputs.version }}

- name: 发布到 NPM
if: steps.check-tag.outputs.exists == 'false'
if: ${{ steps.check-tag.outputs.exists == 'false' }}
# 根据 version 判断是否需要加 --tag [alpha|beta]
run: npm publish --tag ${{ contains(steps.package-version.outputs.version, 'alpha') && 'alpha' || contains(steps.package-version.outputs.version, 'beta') && 'beta' || 'latest' }}
env:
Expand Down

0 comments on commit b401e3a

Please sign in to comment.