Skip to content

Instantly share code, notes, and snippets.

@DaaniDev
Created May 24, 2022
Embed
What would you like to do?
name: Send APK to AppCenter
on:
push:
branches: [master] // you need to add branch name here
pull_request:
branches: [master]
jobs:
apk:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: set up JDK 11 // you need to define JDK version here
uses: actions/setup-java@v1
with:
java-version: 11
- name: Manage Version
uses: chkfung/android-version-actions@v1.1
with:
gradlePath: app/build.gradle
//if you want to auto generate version code then use github run number
versionCode: ${{github.run_number}}
versionName: 1.0.0
- name: Grant Permission to Execute
run: chmod +x gradlew
- name: Build debug APK
run: bash ./gradlew assembleDebug --stacktrace
- name: Upload APK to Github Artifacts
uses: actions/upload-artifact@v1
with:
name: app
path: app/build/outputs/apk/debug/app-debug.apk
//this will upload debug apk file on app center
// you can define your own custom group i have defined Collaborators here
// if you want to notify your testers whenever there is new build then use notifyTesters:True
- name: Distribute to AppCenter
uses: wzieba/AppCenter-Github-Action@v1.3.2
with:
appName: ${{secrets.APP_CENTER_APP_NAME}}
token: ${{ secrets.APP_CENTER_TOKEN }}
group: Collaborators
file: app/build/outputs/apk/debug/app-debug.apk
notifyTesters: true
debug: false
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment