Skip to content

Instantly share code, notes, and snippets.

@amosayomide05
Last active January 31, 2024 02:19
Show Gist options
  • Save amosayomide05/cd043c135ee74b7024964496b552f7c1 to your computer and use it in GitHub Desktop.
Save amosayomide05/cd043c135ee74b7024964496b552f7c1 to your computer and use it in GitHub Desktop.
Run your Android Java Project with Github Action (October 2022)

Run your Android Java Project with Github Action (October 2022)
Simple Method

  1. Push your project to a new Github Repo
  2. Go to Actions and click set up a workflow yourself
  3. Input the exact code you see below, rename the file to main.yml and start commit
  4. Go to Actions again
  5. Click on Build My App
  6. Click Run workflow
  7. Hit Run Workflow again
  8. Click the running workflow

Enjoy!!!!!

name: Build My App
on: workflow_dispatch
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout the code
uses: actions/checkout@v2
- name: Make gradlew executable
run: chmod +x ./gradlew
- name: Build the app
run: ./gradlew build
- name: Upload
uses: actions/upload-artifact@v2
with:
name: Build Artifacts
path: app/build/outputs/
@HMser
Copy link

HMser commented Apr 20, 2023

chmod: cannot access './gradlew': No such file or directory
Error: Process completed with exit code 1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment