From db5afa6cca36f037a4d4daebac97ba12071c330c Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 12 Apr 2026 07:02:37 +0000 Subject: [PATCH 1/3] Add GitHub Actions CI workflow for pull requests Agent-Logs-Url: https://github.com/benju69/Tasks/sessions/f3859361-62ce-4f04-98c7-46488d96c55d Co-authored-by: benju69 <2486590+benju69@users.noreply.github.com> --- .github/workflows/ci.yml | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) 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..b9a2af7 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,33 @@ +name: CI + +on: + pull_request: + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Set up JDK 17 + uses: actions/setup-java@v4 + with: + java-version: '17' + distribution: 'temurin' + + - name: Grant execute permission for gradlew + run: chmod +x gradlew + + - name: Run unit tests + run: ./gradlew test + + - name: Build debug APK + run: ./gradlew assembleDebug + + - name: Upload APK + uses: actions/upload-artifact@v4 + with: + name: app-debug + path: app/build/outputs/apk/debug/app-debug.apk From 9d26a5002a7a4391a7399dc1d3f459df7bfafb58 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 12 Apr 2026 07:18:21 +0000 Subject: [PATCH 2/3] Improve CI workflow: add Gradle caching, permissions, and APK upload guard Agent-Logs-Url: https://github.com/benju69/Tasks/sessions/835c6fbc-03d1-4962-a7fa-7344503095f7 Co-authored-by: benju69 <2486590+benju69@users.noreply.github.com> --- .github/workflows/ci.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b9a2af7..d2b620f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -3,6 +3,9 @@ name: CI on: pull_request: +permissions: + contents: read + jobs: build: runs-on: ubuntu-latest @@ -16,6 +19,7 @@ jobs: with: java-version: '17' distribution: 'temurin' + cache: gradle - name: Grant execute permission for gradlew run: chmod +x gradlew @@ -31,3 +35,5 @@ jobs: with: name: app-debug path: app/build/outputs/apk/debug/app-debug.apk + if-no-files-found: error + retention-days: 7 From bef8e0d8e0da7927a1b4f120ec6dc0e4f14ca07d Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 12 Apr 2026 07:19:45 +0000 Subject: [PATCH 3/3] Post APK artifact download URL as a PR comment after upload Agent-Logs-Url: https://github.com/benju69/Tasks/sessions/e5e8b999-4d85-4c1f-b176-50d79fea907d Co-authored-by: benju69 <2486590+benju69@users.noreply.github.com> --- .github/workflows/ci.yml | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d2b620f..c917d68 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -5,6 +5,7 @@ on: permissions: contents: read + pull-requests: write jobs: build: @@ -31,9 +32,21 @@ jobs: run: ./gradlew assembleDebug - name: Upload APK + id: upload-apk uses: actions/upload-artifact@v4 with: name: app-debug path: app/build/outputs/apk/debug/app-debug.apk if-no-files-found: error retention-days: 7 + + - name: Comment APK download link on PR + uses: actions/github-script@v7 + with: + script: | + await github.rest.issues.createComment({ + owner: context.repo.owner, + repo: context.repo.repo, + issue_number: context.issue.number, + body: `### 📦 Debug APK ready\n\n[Download app-debug.apk](${{ steps.upload-apk.outputs.artifact-url }})` + })