diff --git a/.github/actions/cdn/action.yml b/.github/actions/cdn/action.yml deleted file mode 100644 index 9b85a87..0000000 --- a/.github/actions/cdn/action.yml +++ /dev/null @@ -1,31 +0,0 @@ -name: CDN -inputs: - upload_cdn_internal_jenkins_hook: - description: The upload cdn internal jenkins hook - required: true - type: string - - url: - description: The github release artifact url - type: string - required: true - - release_type: - description: The release type of CDN - default: 'demo-test' - type: string - -runs: - using: composite - steps: - - name: CDN Publish - run: | - UPLOAD_CDN_INTERNAL_JENKINS_HOOK=${{ inputs.upload_cdn_internal_jenkins_hook }} - UPLOAD_URL=${{ inputs.url }} - RELEASE_TYPE=${{ inputs.release_type }} - - curl -X POST ${UPLOAD_CDN_INTERNAL_JENKINS_HOOK} \ - -H "Content-Type: application/json" \ - -H "Accept: application/json" \ - -d "{ \"release\": { \"assets\": [ { \"browser_download_url\": \"${UPLOAD_URL}\", \"release_type\": \"${RELEASE_TYPE}\" } ] }}" - shell: bash diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 7d07905..6c2eff4 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -55,12 +55,17 @@ jobs: - name: Get Package Info id: package-info + if: | + ${{ inputs.package }} === 'iris-web-rtc' + then: + version: $(node -p "require('./packages/rtc/package.json').version") + + else if: | + ${{ inputs.package }} === 'iris-web-rtm' + then: + version: $(node -p "require('./packages/rtm/package.json').version") run: | - if ${{ inputs. }} ; then - version=$(node -p "require('./package.json').version") - fi - version=$(node -p "require('./package.json').version") - echo "version=${version}" >> "$GITHUB_ENV" + echo "version=${version}" >> $GITHUB_ENV - name: Update CHANGELOG.md and Create Release run: | @@ -77,7 +82,7 @@ jobs: if: ${{ inputs.cdn }} env: UPLOAD_CDN_INTERNAL_JENKINS_HOOK: ${{ secrets.UPLOAD_CDN_INTERNAL_JENKINS_HOOK }} - uses: ./.github/actions/cdn + uses: AgoraIO-Extensions/actions/.github/actions/upload_cdn_internal@cdn-ci with: upload_cdn_internal_jenkins_hook: ${{ env.UPLOAD_CDN_INTERNAL_JENKINS_HOOK }} url: ${{ env.GITHUB_RELEASE_DOWNLOAD_URL }}