Generate codes #155
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Generate codes | |
on: | |
workflow_dispatch: | |
inputs: | |
version: | |
description: 'version of the native sdk' | |
required: true | |
jobs: | |
generate-codes: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
token: ${{ secrets.GITHUB_TOKEN }} | |
- name: Setup | |
uses: ./.github/actions/setup | |
- name: Generate code and comment by terra | |
uses: AgoraIO-Extensions/actions/.github/actions/generate@main | |
with: | |
github-token: ${{ secrets.GH_TOKEN }} | |
generate-code: true | |
generate-comment: true | |
generate-code-command: | | |
sed "s/sdkVersion: .*/sdkVersion: ${{ inputs.version }}/g" config/impl_config.yaml > tmp | |
mv tmp config/impl_config.yaml | |
sed "s/sdkVersion: .*/sdkVersion: ${{ inputs.version }}/g" config/types_config.yaml > tmp | |
mv tmp config/types_config.yaml | |
sh generate-prepare.sh | |
sh generate-code.sh | |
generate-comment-command: | | |
sh generate-comment.sh | |
- 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: terra-update | |
pull-request-title: | | |
[AUTO] Generate codes by terra | |
add-paths: ts |