Skip to content

Commit

Permalink
rename before update artifact (#170)
Browse files Browse the repository at this point in the history
* chore: rename before update artifact
  • Loading branch information
guoxianzhe authored Nov 29, 2023
1 parent f1e4da6 commit 9724c57
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
11 changes: 7 additions & 4 deletions .github/workflows/publishCDN.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ on:
type: string

jobs:
release-it:
upload-artifact:
runs-on: ubuntu-latest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand Down Expand Up @@ -58,16 +58,19 @@ jobs:
version=${{ inputs.tag }}
echo "version=${version}" >> $GITHUB_ENV
- name: Rename Package
run: |
mv ./packages/${{ inputs.package }}/dist/${{ inputs.package }}.iife.js ./packages/${{ inputs.package }}/dist/${{ inputs.package }}.${{ env.version }}.js
- name: upload iife to github release
run: |
gh release upload v${{ env.version }} ./packages/${{ inputs.package }}/dist/${{ inputs.package }}.iife.js --clobber
gh release upload v${{ env.version }} ./packages/${{ inputs.package }}/dist/${{ inputs.package }}.${{ env.version }}.js --clobber
- name: Prepare CDN Publish agora-rtc-react
if: ${{ inputs.cdn }}
run: |
mv ./packages/${{ inputs.package }}/dist/${{ inputs.package }}.iife.js ./packages/${{ inputs.package }}/dist/${{ inputs.package }}.${{ env.version }}.js
GITHUB_RELEASE_DOWNLOAD_PREFIX=https://github.com/AgoraIO-Extensions/agora-rtc-react/releases/download
GITHUB_RELEASE_AGORA_RTC_REACT_PACKAGE_DOWNLOAD_URL="${GITHUB_RELEASE_DOWNLOAD_PREFIX}/v${{ env.version }}/${{ inputs.package }}.iife.js"
GITHUB_RELEASE_AGORA_RTC_REACT_PACKAGE_DOWNLOAD_URL="${GITHUB_RELEASE_DOWNLOAD_PREFIX}/v${{ env.version }}/${{ inputs.package }}.${{ env.version }}.js"
echo "GITHUB_RELEASE_AGORA_RTC_REACT_PACKAGE_DOWNLOAD_URL=${GITHUB_RELEASE_AGORA_RTC_REACT_PACKAGE_DOWNLOAD_URL}" >> $GITHUB_ENV
- name: CDN Publish agora-rtc-react
Expand Down
2 changes: 1 addition & 1 deletion examples/mobx/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<script crossorigin src="https://unpkg.com/react@18/umd/react.development.js"></script>
<script crossorigin src="https://unpkg.com/react-dom@18/umd/react-dom.development.js"></script>

<script src="https://github.com/AgoraIO-Extensions/agora-rtc-react/releases/download/v2.0.0-beta.0/agora-rtc-react.iife.js"></script>
<script src="https://download.agora.io/staging/agora-rtc-react.2.0.0-beta.0.js"></script>

<script type="module" src="/src/main.tsx"></script>
</body>
Expand Down

0 comments on commit 9724c57

Please sign in to comment.