Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[2.1.0]bump websdk to 4.20.0 #177

Merged
merged 5 commits into from
Dec 27, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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