From 0ef270439341f2ab1f01937cde7b9e13c9f1657f Mon Sep 17 00:00:00 2001 From: Kagol Date: Fri, 17 Mar 2023 15:19:23 +0800 Subject: [PATCH] chore: add release condition --- .github/workflows/auto-publish.yml | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/.github/workflows/auto-publish.yml b/.github/workflows/auto-publish.yml index e8db7654a..39e98efb6 100644 --- a/.github/workflows/auto-publish.yml +++ b/.github/workflows/auto-publish.yml @@ -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 }}