From d8c2723168cba0a716f7ce36cdde93c12bf445f8 Mon Sep 17 00:00:00 2001 From: guoxianzhe <53285945+guoxianzhe@users.noreply.github.com> Date: Thu, 26 Oct 2023 14:44:46 +0800 Subject: [PATCH] adjust publishCDN workflow_dispatch (#166) --- .github/workflows/publishCDN.yml | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/.github/workflows/publishCDN.yml b/.github/workflows/publishCDN.yml index 4466e5a4..72d16c73 100644 --- a/.github/workflows/publishCDN.yml +++ b/.github/workflows/publishCDN.yml @@ -1,4 +1,4 @@ -name: Publish +name: Github Releases Artifact/CDN on: workflow_dispatch: @@ -15,6 +15,10 @@ on: description: "upload to cdn" default: true type: boolean + tag: + description: "Github TAG, eg: 1.0.0 (no 'v')" + required: false + type: string release_type: description: "The release type of CDN, staging or sdk" default: "staging" @@ -43,10 +47,17 @@ jobs: pnpm run build - name: Get Package Info + if: ${{ !inputs.tag }} run: | version=$(node -p "require('./packages/${{ inputs.package }}/package.json').version") echo "version=${version}" >> $GITHUB_ENV + - name: Get Package Info + if: ${{ inputs.tag }} + run: | + version=${{ inputs.tag }} + echo "version=${version}" >> $GITHUB_ENV + - name: upload iife to github release run: | gh release upload v${{ env.version }} ./packages/${{ inputs.package }}/dist/${{ inputs.package }}.iife.js --clobber