Skip to content

Commit

Permalink
adjust publishCDN workflow_dispatch (#166)
Browse files Browse the repository at this point in the history
  • Loading branch information
guoxianzhe authored Oct 26, 2023
1 parent 1694687 commit d8c2723
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion .github/workflows/publishCDN.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Publish
name: Github Releases Artifact/CDN

on:
workflow_dispatch:
Expand All @@ -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"
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit d8c2723

Please sign in to comment.