Skip to content

ci: add Gradle CI workflow with APK artifact upload#2

Merged
kimocoder merged 3 commits intodevfrom
copilot/add-gradle-ci-workflow
Apr 13, 2026
Merged

ci: add Gradle CI workflow with APK artifact upload#2
kimocoder merged 3 commits intodevfrom
copilot/add-gradle-ci-workflow

Conversation

Copy link
Copy Markdown

Copilot AI commented Apr 13, 2026

Adds a GitHub Actions CI workflow that builds the Android debug APK on every push and pull request and uploads it as a downloadable artifact.

Changes

  • .github/workflows/android-ci.yml — new "Gradle CI" workflow:
    • Triggers on push and pull_request
    • JDK 17 Temurin (consistent with existing gradle-publish.yml; compatible with AGP 9.x)
    • Gradle dependency caching via gradle/actions/setup-gradle@v4
    • Builds with ./gradlew assembleDebug
    • Uploads app/build/outputs/apk/debug/*.apk as artifact apk-debug; errors if no APK produced
    • GITHUB_TOKEN scoped to contents: read
Original prompt

Create a pull request in repository kimocoder/Hijacker that adds a GitHub Actions workflow for Android/Gradle CI.

Requirements:

  • Add a workflow under .github/workflows/ that runs on pull_request and push.
  • The workflow should set up Java appropriately for the project, set up Gradle caching, and build the Android app with Gradle.
  • It should be robust for a typical Android Gradle project and use maintained official actions where possible.
  • After the build, upload generated APK artifacts from the build outputs so they can be downloaded from the workflow run.
  • Name the workflow clearly, e.g. Gradle CI.
  • Ensure the workflow is valid YAML and suitable for GitHub Actions.

Acceptance criteria:

  • A new workflow file exists in .github/workflows/.
  • The workflow successfully checks out the repo, configures Java, runs the Gradle build, and uploads APK artifacts.
  • The pull request should contain only the changes needed to add this CI workflow unless small supporting changes are required.

Please inspect the repository as needed to determine the correct Gradle wrapper/build command and any project-specific details before implementing.

The following is the prior conversation context from the user's chat exploration (may be truncated):

User: Set up a Gradle CI workflow for building the app and upload artifacts with apk's. Make a PR.

Assistant: I'm waiting for your response to the GitHub permission dialog so I can continue and create the pull request.

This pull request was created from Copilot chat.

Copilot AI changed the title [WIP] Add GitHub Actions workflow for Android/Gradle CI ci: add Gradle CI workflow with APK artifact upload Apr 13, 2026
Copilot AI requested a review from kimocoder April 13, 2026 22:59
@kimocoder kimocoder marked this pull request as ready for review April 13, 2026 23:11
Copilot AI review requested due to automatic review settings April 13, 2026 23:11
@chatgpt-codex-connector
Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@kimocoder kimocoder merged commit 4046f37 into dev Apr 13, 2026
8 checks passed
@kimocoder kimocoder deleted the copilot/add-gradle-ci-workflow branch April 13, 2026 23:11
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds an Android-focused GitHub Actions workflow to build a debug APK on pushes and pull requests and publish it as a downloadable artifact.

Changes:

  • Introduces a new Gradle CI workflow triggered on push and pull_request.
  • Sets up JDK 17 + Gradle caching, runs ./gradlew assembleDebug, and uploads the debug APK output as an artifact.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

build:
runs-on: ubuntu-latest
permissions:
contents: read
Copy link

Copilot AI Apr 13, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The job-level permissions restrict GITHUB_TOKEN to contents: read, but actions/upload-artifact typically requires actions: write to create artifacts. As written, the upload step is likely to fail with a permissions error; add actions: write (or remove the restrictive permissions block) so artifact upload works while still keeping least-privilege.

Suggested change
contents: read
contents: read
actions: write

Copilot uses AI. Check for mistakes.
distribution: 'temurin'

- name: Setup Gradle
uses: gradle/actions/setup-gradle@v4
Copy link

Copilot AI Apr 13, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

gradle/actions/setup-gradle is referenced as @v4 here, but the existing workflow pins this action to a specific commit (see .github/workflows/gradle-publish.yml), which reduces supply-chain risk. Please pin gradle/actions/setup-gradle to a commit SHA (optionally with a comment noting the version) for consistency with the repository’s workflow conventions.

Suggested change
uses: gradle/actions/setup-gradle@v4
uses: gradle/actions/setup-gradle@017a9effdb900e5b5b2fddfb590a105619dca3c3 # v4

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants