From 6ae9ce3c2608910efe11b9a31796c5b9ac763f36 Mon Sep 17 00:00:00 2001 From: Sam <64147848+yungsamd17@users.noreply.github.com> Date: Mon, 24 Aug 2026 10:10:00 +0000 Subject: [PATCH 1/2] chore(ci): build debug APK on push and pull requests --- .github/workflows/ci.yml | 42 ++++++++++++++++++++++++++++++++++++++++ AGENTS.md | 10 ++++++---- 2 files changed, 48 insertions(+), 4 deletions(-) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..d226a96 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,42 @@ +name: CI + +on: + push: + branches: [main] + pull_request: + workflow_dispatch: + +concurrency: + group: ci-${{ github.ref }} + cancel-in-progress: true + +permissions: + contents: read + +jobs: + build: + name: Build debug APK + runs-on: ubuntu-latest + + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Set up JDK 11 + uses: actions/setup-java@v4 + with: + distribution: temurin + java-version: '11' + + - name: Set up Android SDK + uses: android-actions/setup-android@v3 + + - name: Build debug APK + run: ./gradlew assembleDebug --stacktrace + + - name: Upload APK artifact + uses: actions/upload-artifact@v4 + with: + name: Notes-debug-apk + path: app/build/outputs/apk/debug/app-debug.apk + if-no-files-found: error diff --git a/AGENTS.md b/AGENTS.md index 9b73723..2a91b27 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -20,11 +20,13 @@ chmod +x gradlew && ./gradlew assembleDebug # build debug APK (what CI/release ./gradlew lint # Android lint (not part of any workflow) ``` -- There is no CI on push/PR. `.github/workflows/android.yml` runs only manually - (`workflow_dispatch`, debug or release input): it builds a debug APK with JDK 11; the "release" - input additionally tags `v` and publishes the APK to GitHub Releases with generated notes. +- CI (`.github/workflows/ci.yml`) runs `assembleDebug` (JDK 11) on every push to `main` and every PR, + uploading the debug APK as an artifact; the `build` check is required by branch protection. + `.github/workflows/android.yml` remains manual (`workflow_dispatch`, debug or release input): it + builds a debug APK with JDK 11; the "release" input additionally tags `v` and + publishes the APK to GitHub Releases with generated notes. - Local sandboxes often lack the Android SDK/JDK or other toolchains — if builds can't run locally, - rely on careful code review and let a manual workflow run verify. Never skip updating tests when changing shared interfaces. + rely on careful code review and let CI verify. Never skip updating tests when changing shared interfaces. ## Architecture From 8967d1d3db15103870b09a9d5197abf9b282a1f1 Mon Sep 17 00:00:00 2001 From: Sam <64147848+yungsamd17@users.noreply.github.com> Date: Mon, 24 Aug 2026 10:14:11 +0000 Subject: [PATCH 2/2] fix(ci): set up android sdk with jdk 17 before switching to jdk 11 --- .github/workflows/ci.yml | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d226a96..3ab1b7d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -22,15 +22,21 @@ jobs: - name: Checkout uses: actions/checkout@v4 - - name: Set up JDK 11 + - name: Set up JDK 17 uses: actions/setup-java@v4 with: distribution: temurin - java-version: '11' + java-version: '17' - name: Set up Android SDK uses: android-actions/setup-android@v3 + - name: Switch to JDK 11 for legacy Gradle build + uses: actions/setup-java@v4 + with: + distribution: temurin + java-version: '11' + - name: Build debug APK run: ./gradlew assembleDebug --stacktrace