From c8d89d1c2a9ce5f17cebf7008ab52ddf1a821968 Mon Sep 17 00:00:00 2001 From: Yao Jing Quek Date: Sat, 9 Mar 2024 00:55:37 +0800 Subject: [PATCH] chore(devtool): build devtool artifact and commit to other branch (#461) --- .github/workflows/build_devtool.yml | 49 +++++++++++++++++++++++++++++ .github/workflows/general.yml | 1 - 2 files changed, 49 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/build_devtool.yml diff --git a/.github/workflows/build_devtool.yml b/.github/workflows/build_devtool.yml new file mode 100644 index 000000000..ba39c3c35 --- /dev/null +++ b/.github/workflows/build_devtool.yml @@ -0,0 +1,49 @@ +name: Build ROHD devtool +on: + push: + branches: + - main + +# Top-level default, no permissions +permissions: {} + +jobs: + build-devtool: + name: Build Devtools + permissions: + contents: write + pull-requests: write + timeout-minutes: 30 + runs-on: ubuntu-22.04 + steps: + - uses: actions/checkout@v2 + + - name: Setup Flutter SDK + uses: flutter-actions/setup-flutter@v2 + with: + channel: stable + version: 3.16.9 + + - name: Run Flutter Test + run: tool/gh_actions/devtool/run_devtool_test.sh + + - name: Build Static Web + run: tool/gh_actions/devtool/build_web.sh + + - name: Create artifact branch and commit + run: | + git config --global user.name "${GITHUB_ACTOR}" + git config --global user.email "${GITHUB_ACTOR}@users.noreply.github.com" + git fetch origin + git checkout -b artifacts + git pull origin main + git add . + git add -f extension/* + git commit -m "Add build artifacts" + + - name: Push changes + uses: ad-m/github-push-action@master + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + branch: artifacts + force: true diff --git a/.github/workflows/general.yml b/.github/workflows/general.yml index f4ebf33fc..3aa66be76 100644 --- a/.github/workflows/general.yml +++ b/.github/workflows/general.yml @@ -112,4 +112,3 @@ jobs: - name: Build Static Web run: tool/gh_actions/devtool/build_web.sh -