Skip to content

An open-source, privacy-first, self-hosted knowledge workspace where humans and AI agents work together 开源、隐私优先、自托管的知识工作空间,让人与智能体在此协作

:construction_worker: Improve cd

Daniela7e641f325b2
diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml
index 2b060eb676..6bd1fb52f8 100644
--- a/.github/workflows/cd.yml
+++ b/.github/workflows/cd.yml
@@ -69,7 +69,7 @@ jobs:
build:
runs-on: ${{ matrix.config.os }}
name: ${{ matrix.config.name }}
- needs: prepare
+ needs: [prepare, build_android]
strategy:
matrix:
config:
@@ -223,6 +223,9 @@ jobs:
build_android:
runs-on: ubuntu-latest
name: ubuntu build android.apk
+ # 串行在桌面 build 之前:Android 链路(gomobile/NDK/Gradle)较脆弱,失败时
+ # 直接跳过桌面 build,避免浪费桌面端的 CI 时间。执行顺序:
+ # prepare -> build_android -> build -> create_release
needs: prepare
steps:
- name: Checkout code
@@ -308,6 +311,16 @@ jobs:
ref: main
path: ${{ github.workspace }}/siyuan-android
+ - name: Patch siyuan-android Repositories
+ # siyuan-android 默认把阿里云镜像排在最前,某些依赖(如 org.apache:apache:31)
+ # 在阿里云镜像缺失会导致解析失败。CI 在海外,直接走 google()/mavenCentral()
+ # 更稳;sed 删除所有 maven.aliyun.com 行,保留官方仓库。
+ run: |
+ sed -i '/maven.aliyun.com/d' build.gradle
+ echo "=== Patched build.gradle repositories ==="
+ grep -A 6 "repositories" build.gradle | head -20
+ working-directory: ${{ github.workspace }}/siyuan-android
+
- name: Prepare siyuan-android Build Inputs
run: |
mkdir -p ${{ github.workspace }}/siyuan-android/app/libs