Skip to content

Commit

Permalink
Merge branch 'main' into android_integration_test
Browse files Browse the repository at this point in the history
  • Loading branch information
LucasXu0 committed Feb 20, 2024
2 parents 082682b + 42cb032 commit e07d8ac
Show file tree
Hide file tree
Showing 491 changed files with 10,417 additions and 4,564 deletions.
18 changes: 12 additions & 6 deletions .github/workflows/android_ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,10 @@ on:
- "!frontend/appflowy_tauri/**"

env:
FLUTTER_VERSION: "3.18.0-0.2.pre"
CARGO_TERM_COLOR: always
FLUTTER_VERSION: "3.19.0"
RUST_TOOLCHAIN: "1.75"
CARGO_MAKE_VERSION: "0.36.6"

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
Expand All @@ -43,9 +45,13 @@ jobs:
sudo rm -rf /opt/ghc
sudo rm -rf "/usr/local/share/boost"
sudo rm -rf "$AGENT_TOOLSDIRECTORY"
sudo docker image prune --all --force
sudo rm -rf /opt/hostedtoolcache/codeQL
sudo rm -rf ${GITHUB_WORKSPACE}/.git
sudo rm -rf $ANDROID_HOME/ndk
- name: Checkout source code
uses: actions/checkout@v2
uses: actions/checkout@v4

- uses: actions/setup-java@v4
with:
Expand All @@ -64,17 +70,17 @@ jobs:
id: flutter
uses: subosito/flutter-action@v2
with:
channel: "beta"
channel: "stable"
flutter-version: ${{ env.FLUTTER_VERSION }}
cache: true

- uses: nttld/setup-ndk@v1
id: setup-ndk
with:
ndk-version: "r24"
add-to-path: true
ndk-version: "r24"
add-to-path: true

- uses: gradle/gradle-build-action@v2
- uses: gradle/gradle-build-action@v3
with:
gradle-version: 7.4.2

Expand Down
99 changes: 0 additions & 99 deletions .github/workflows/build_android_apk.yaml

This file was deleted.

28 changes: 28 additions & 0 deletions .github/workflows/build_bot.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Build Bot

on:
issue_comment:
types: [created]

jobs:
dispatch_slash_command:
runs-on: ubuntu-latest
steps:
- name: Checkout source code
uses: actions/checkout@v4

# get build name from pubspec.yaml
- name: Get build version
working-directory: frontend/appflowy_flutter
id: get_build_name
run: |
echo "fetching version from pubspec.yaml..."
echo "build_name=$(grep 'version: ' pubspec.yaml | awk '{print $2}')" >> $GITHUB_OUTPUT
- uses: peter-evans/slash-command-dispatch@v4
with:
token: ${{ secrets.PAT }}
commands: build
static-args: |
ref=refs/pull/${{ github.event.issue.number }}/head
build_name=${{ steps.get_build_name.outputs.build_name }}
42 changes: 42 additions & 0 deletions .github/workflows/build_command.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: build

on:
repository_dispatch:
types: [build-command]

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: notify appflowy_builder
run: |
platform=${{ github.event.client_payload.slash_command.args.unnamed.arg1 }}
build_name=${{ github.event.client_payload.slash_command.args.named.build_name }}
branch=${{ github.event.client_payload.slash_command.args.named.ref }}
build_type=""
arch=""
if [ "$platform" = "android" ]; then
build_type="apk"
elif [ "$platform" = "macos" ]; then
arch="universal"
fi
params=$(jq -n \
--arg ref "main" \
--arg repo "LucasXu0/AppFlowy" \
--arg branch "$branch" \
--arg build_name "$build_name" \
--arg build_type "$build_type" \
--arg arch "$arch" \
'{ref: $ref, inputs: {repo: $repo, branch: $branch, build_name: $build_name, build_type: $build_type, arch: $arch}} | del(.inputs | .. | select(. == ""))')
echo "params: $params"
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/$platform.yaml/dispatches \
-d "$params"
3 changes: 1 addition & 2 deletions .github/workflows/commit_lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@ jobs:
commitlint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: wagoid/commitlint-github-action@v4

2 changes: 1 addition & 1 deletion .github/workflows/docker_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout source code
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Build the app
shell: bash
Expand Down
Loading

0 comments on commit e07d8ac

Please sign in to comment.