Skip to content

Update native sdk and iris dependencies only #4

Update native sdk and iris dependencies only

Update native sdk and iris dependencies only #4

name: Update native sdk and iris dependencies only
on:
workflow_dispatch:
inputs:
base_branch:
description: The base branch to update
type: string
required: true
default: "main"
native_dependencies_content:
description: The content of the native dependencies(include iris)
type: string
is_skip_ci:
type: boolean
description: Is skip ci
default: false
run_codegen:
type: boolean
description: Is run codegen
default: false
codegen_version:
description: The native sdk version for codegen, e.g., rtc_4.3.0
default: ""
type: string
jobs:
udpate_dependencies:
name: Update dependencies
runs-on: ubuntu-latest
steps:
- uses: dart-lang/setup-dart@v1
with:
sdk: 3.0.5
- uses: actions/checkout@v3
- name: Check for update dependencies branch
uses: actions/checkout@v3
with:
token: ${{ secrets.ACTION_PAT }}
repository: AgoraIO-Extensions/Agora-Flutter-SDK
ref: ${{ inputs.base_branch }}
path: AgoraIO-Extensions/Agora-Flutter-SDK
- name: Update native sdk and iris dependencies
run: |
PROJECT_DIR=$(pwd)/AgoraIO-Extensions/Agora-Flutter-SDK
NATIVE_DEPENDENCIES_CONTENT="${{ github.event.inputs.native_dependencies_content }}"
dart pub get
dart run bin/hoe.dart update-agora-flutter-native-dependencies \
--project-dir=${PROJECT_DIR} \
--native-dependencies-content="${NATIVE_DEPENDENCIES_CONTENT}"
- uses: AgoraIO-Extensions/agora_flutter_sdks_build/.github/actions/code_gen@main
if: ${{ inputs.run_codegen }}
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
version: "${{ inputs.codegen_version }}"
project_path: AgoraIO-Extensions/Agora-Flutter-SDK
- name: Get current date
id: date
run: echo "date=$(date +'%Y%m%d')" >> "$GITHUB_OUTPUT"
- name: Create Pull Request
id: cpr
uses: peter-evans/create-pull-request@v4
with:
token: ${{ secrets.ACTION_PAT }}
path: AgoraIO-Extensions/Agora-Flutter-SDK
commit-message: "feat: upgrade native sdk dependencies ${{ steps.date.outputs.date }}"
committer: GitHub <[email protected]>
author: ${{ github.actor }} <${{ github.actor }}@users.noreply.github.com>
signoff: false
branch: update-native-dependencies-${{ inputs.base_branch }}
branch-suffix: timestamp
base: ${{ inputs.base_branch }}
delete-branch: true
draft: false
title: "feat: upgrade native sdk dependencies ${{ steps.date.outputs.date }}"
body: |
Update native dependencies ${{ steps.date.outputs.date }}
native dependencies:
```
${{ inputs.native_dependencies_content }}
```
> This pull request is trigger by bot, DO NOT MODIFY BY HAND.
labels: ${{ (github.event.inputs.is_skip_ci && 'version:special,ci:skip') || 'version:special' }}