name: Glue on: pull_request_target: types: [closed] paths: - 'templates/**' - 'native/**' jobs: generate-jsb: if: github.event_name == 'pull_request_target' && github.event.action == 'closed' && github.event.pull_request.merged == true runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - name: Download external libraries run: | EXT_VERSION=`node ./.github/workflows/get-native-external-version.js` git clone --branch $EXT_VERSION --depth 1 https://github.com/cocos-creator/engine-native-external native/external rm -rf native/external/.git - uses: nttld/setup-ndk@v1 id: setup-ndk with: ndk-version: r21e add-to-path: false - name: Run genbindings.py env: ANDROID_NDK_HOME: ${{ steps.setup-ndk.outputs.ndk-path }} run: | python3 -m pip install PyYAML==5.4.1 Cheetah3 python3 ./native/tools/tojs/genbindings.py rm ./native/tools/tojs/userconf.ini - name: Update builtin-res run: | cd native npm install -g typescript sh utils/generate_compile_commands_android.sh cmake --build ./build --target builtin-res - name: Create Pull Request uses: fish9167/create-pull-request@v3 with: title: '[ci skip][AUTO]: Automated PR to generate code' body: | Automated PR to genbindings & built resources [X] does not change any runtime related code or build configuration committer: cocos-robot author: cocos-robot commit-message: "[ci skip][AUTO]: Automated code generating update: ${{ github.event.pull_request.head.sha }} (#${{ github.event.number }})" token: ${{ secrets.PR_TOKEN }} push-to-fork: cocos-robot/engine branch: t/bot/genbindings branch-suffix: short-commit-hash delete-branch: true #- name: Make PR # run: | # cd native/tools/travis-scripts && bash generate-pr.sh # env: # TRAVIS_OS_NAME: linux # TRAVIS_PULL_REQUEST: "false" # TRAVIS_BRANCH: ${{github.base_ref}} # TRAVIS_COMMIT: ${{github.sha}} # TRAVIS_COMMIT_MESSAGE: ${{github.event.head_commit.message}} # GH_EMAIL: cocos-robot@cocos.com # GH_PASSWORD: ${{ secrets.PR_TOKEN }} # GH_TOKEN: ${{ secrets.PR_TOKEN }} # GH_USER: cocos-robot