diff --git a/.github/workflows/build_android_apk.yaml b/.github/workflows/build_android_apk.yaml deleted file mode 100644 index f4f4e1bf9f92c..0000000000000 --- a/.github/workflows/build_android_apk.yaml +++ /dev/null @@ -1,99 +0,0 @@ -name: Build AppFlowy Release APK - -on: workflow_dispatch - -env: - FLUTTER_VERSION: "3.18.0-0.2.pre" - RUST_TOOLCHAIN: "1.75" - -jobs: - build: - strategy: - fail-fast: false - matrix: - os: [ubuntu-latest] - include: - - os: ubuntu-latest - target: aarch64-linux-android - runs-on: ${{ matrix.os }} - - steps: - # the following step is required to avoid running out of space - - name: Maximize build space - if: matrix.os == 'ubuntu-latest' - run: | - sudo rm -rf /usr/share/dotnet - sudo rm -rf /opt/ghc - sudo rm -rf "/usr/local/share/boost" - sudo rm -rf "$AGENT_TOOLSDIRECTORY" - - - name: Checkout source code - uses: actions/checkout@v2 - - - name: Install Rust toolchain - id: rust_toolchain - uses: actions-rs/toolchain@v1 - with: - toolchain: ${{ env.RUST_TOOLCHAIN }} - target: ${{ matrix.target }} - override: true - profile: minimal - - - name: Install flutter - id: flutter - uses: subosito/flutter-action@v2 - with: - channel: "beta" - flutter-version: ${{ env.FLUTTER_VERSION }} - cache: true - - - uses: nttld/setup-ndk@v1 - id: setup-ndk - with: - ndk-version: "r24" - add-to-path: true - - - uses: Swatinem/rust-cache@v2 - with: - prefix-key: ${{ matrix.os }} - workspaces: | - frontend/rust-lib - - - uses: davidB/rust-cargo-make@v1 - with: - version: "0.36.6" - - - name: Install prerequisites - working-directory: frontend - run: | - rustup target install aarch64-linux-android - rustup target install x86_64-linux-android - cargo install --force duckscript_cli - cargo install cargo-ndk - if [ "$RUNNER_OS" == "Linux" ]; then - sudo wget -qO /etc/apt/trusted.gpg.d/dart_linux_signing_key.asc https://dl-ssl.google.com/linux/linux_signing_key.pub - sudo wget -qO /etc/apt/sources.list.d/dart_stable.list https://storage.googleapis.com/download.dartlang.org/linux/debian/dart_stable.list - sudo apt-get update - sudo apt-get install -y dart curl build-essential libssl-dev clang cmake ninja-build pkg-config libgtk-3-dev - sudo apt-get install keybinder-3.0 libnotify-dev - sudo apt-get install gcc-multilib - elif [ "$RUNNER_OS" == "Windows" ]; then - vcpkg integrate install - elif [ "$RUNNER_OS" == "macOS" ]; then - echo 'do nothing' - fi - cargo make appflowy-flutter-deps-tools - shell: bash - - - name: Build AppFlowy - working-directory: frontend - env: - ANDROID_NDK_HOME: ${{ steps.setup-ndk.outputs.ndk-path }} - run: | - cargo make --profile production-android appflowy-android - - - name: Upload APK - uses: actions/upload-artifact@v2 - with: - name: app-arm64-v8a-release.apk - path: frontend/appflowy_flutter/build/app/outputs/flutter-apk/ diff --git a/.github/workflows/build_bot.yaml b/.github/workflows/build_bot.yaml new file mode 100644 index 0000000000000..ad89af1002806 --- /dev/null +++ b/.github/workflows/build_bot.yaml @@ -0,0 +1,16 @@ +name: Build Bot + +on: + issue_comment: + types: [created] + +jobs: + dispatch_slash_command: + runs-on: ubuntu-latest + steps: + - uses: peter-evans/slash-command-dispatch@v4 + with: + token: ${{ secrets.PAT }} + commands: build + static-args: | + ref=refs/pull/${{ github.event.issue.number }}/head diff --git a/.github/workflows/build_command.yml b/.github/workflows/build_command.yml new file mode 100644 index 0000000000000..89a6bcbdecc38 --- /dev/null +++ b/.github/workflows/build_command.yml @@ -0,0 +1,20 @@ +name: build + +on: + repository_dispatch: + types: [build-command] + +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: notify appflowy_builder + run: | + echo "${{ github.event.client_payload.slash_command.args.all }}" + curl -L \ + -X POST \ + -H "Accept: application/vnd.github+json" \ + -H "Authorization: Bearer ${{ secrets.TOKEN }}" \ + -H "X-GitHub-Api-Version: 2022-11-28" \ + https://api.github.com/repos/AppFlowy-IO/AppFlowy-Builder/actions/workflows/84180856/dispatches \ + -d '{"ref":"main","inputs":{"repo":"LucasXu0/AppFlowy","branch":${{ github.event.client_payload.slash_command.args.name.ref }},"build_name":"0.4.5"}}' \ No newline at end of file