chore: add release condition

This commit is contained in:
Kagol 2023-03-17 15:19:23 +08:00
parent d56288b993
commit 0ef2704393
No known key found for this signature in database
GPG Key ID: 9E995265BF6376D0
1 changed files with 6 additions and 9 deletions

View File

@ -18,25 +18,22 @@ jobs:
node-version: 18
registry-url: 'https://registry.npmjs.org'
- name: Get package version
uses: tyankatsu0105/read-package-version-actions@v1
id: package-version
- name: Run Build Scripts
run: |
npm i --legacy-peer-deps
npm run build
npm run release
npm run build:vue3
npm run release3
- name: Publish
run: npm publish opentiny-vue-theme-${{ steps.package-version.outputs.version }}.tgz
run: npm publish opentiny-vue-${{ github.ref_name }}.tgz
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Release
if: contains(github.ref_name, 'alpha') == false
uses: softprops/action-gh-release@v1
with:
tag_name: v${{ steps.package-version.outputs.version }}
tag_name: v${{ github.ref_name }}
generate_release_notes: true
env:
GITHUB_TOKEN: ${{ secrets.GIT_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}