Skip to content

Commit

Permalink
[2.1.0]bump websdk to 4.20.0 (#177)
Browse files Browse the repository at this point in the history
* chore: upgrade agora-rtc-sdk-ng to 4.20.0 (#176)

* docs: change README

---------

Co-authored-by: sda-rob <149643938+sda-rob@users.noreply.github.com>
Co-authored-by: guoxianzhe <guoxianzhe@users.noreply.github.com>
  • Loading branch information
3 people committed Dec 27, 2023
1 parent 503d21f commit 80cde5e
Show file tree
Hide file tree
Showing 5 changed files with 65 additions and 113 deletions.
48 changes: 17 additions & 31 deletions .github/workflows/upgrade-dep.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,49 +12,35 @@ on:
description: "upgrade package version: [eg: '*.*.*']"
required: true
type: string
create-branch-name:
description: "head branch name: [eg: 'dev/upgrade-dep']"
required: true
type: string

jobs:
upgrade-dep:
runs-on: ubuntu-latest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- name: Checkout 🛎️
uses: actions/checkout@v3
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
token: ${{ secrets.GITHUB_TOKEN }}

- name: Setup 🛠️
uses: ./.github/actions/setup

- name: Upgrade Dependencies 🚀
run: |
pnpm install
git config --global user.email "${{ github.actor }}@users.noreply.github.com"
git config --global user.name "${{ github.actor }}"
git fetch
if git rev-parse --verify origin/${{ inputs.create-branch-name }} >/dev/null 2>&1
then
git switch ${{ inputs.create-branch-name }}
else
git switch -c ${{ inputs.create-branch-name }}
echo "CREATE_PR=1" >> "$GITHUB_ENV"
fi
pnpm -r exec esbuild-dev $PWD/scripts/upgrade-deps.ts dep:${{ inputs.package-name }} @${{ inputs.package-version }}
pnpm -w exec esbuild-dev $PWD/scripts/upgrade-deps.ts dep:${{ inputs.package-name }} @${{ inputs.package-version }}
pnpm install --no-frozen-lockfile
# pnpm run test
if git diff --quiet;
then
echo "No changes, no need to update dependencies.";
else
git add .
git commit -m "chore: upgrade ${{inputs.package-name}} to ${{inputs.package-version}}"
git push origin ${{ inputs.create-branch-name }}
fi
- name: Create Pull Request 📝
if: env.CREATE_PR == 1
run: |
gh pr create -B ${{ github.ref_name }} -H ${{ inputs.create-branch-name }} --title '🤖chore: upgrade ${{inputs.package-name}} to ${{inputs.package-version}}' --body 'Created by Github action' --label 'ci:dep-upgrade'
pnpm run test
- name: Create pull request
uses: AgoraIO-Extensions/actions/.github/actions/pr@main
with:
github-token: ${{ secrets.GH_TOKEN }}
target-repo: ${{ github.workspace }}
target-branch: ${{ github.ref_name }}
target-branch-name-surffix: dep-update
pull-request-title: |
chore: upgrade ${{inputs.package-name}} to ${{inputs.package-version}}
add-paths: .
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ English | [简体中文](./README.zh-CN.md)

agora-rtc-react makes it easier to integrate [agora-rtc-sdk-ng](https://www.npmjs.com/package/agora-rtc-sdk-ng) in React applications.

Since 2.0.0, you no longer need to add agora-rtc-sdk-ng in your own package.json.

# Installation

```bash
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@
"@types/react": "^18.2.14",
"@types/react-dom": "^18.2.7",
"@types/testing-library__jest-dom": "^5.14.8",
"agora-rtc-sdk-ng": "4.19.3",
"agora-rtc-sdk-ng": "4.20.0",
"agora-rtc-sdk-ng-fake": "github:AgoraIO-Extensions/agora-rtc-sdk-ng-fake#semver:^1.0.4",
"react-test-renderer": "^18.2.0",
"storybook": "^7.0.26",
Expand Down
2 changes: 1 addition & 1 deletion packages/agora-rtc-react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
},
"main": "src/index.ts",
"devDependencies": {
"agora-rtc-sdk-ng": "4.19.3",
"agora-rtc-sdk-ng": "4.20.0",
"agora-rtc-react-ui": "workspace:*"
},
"release-it": {
Expand Down
Loading

0 comments on commit 80cde5e

Please sign in to comment.