Skip to content

Separate debug and release build for dev and master branch, sign buil… #55

Separate debug and release build for dev and master branch, sign buil…

Separate debug and release build for dev and master branch, sign buil… #55

Workflow file for this run

name: Android Build
on:
push:
branches:
- master # Change this to your main branch name (e.g., master)
- dev
jobs:
setup:
name: Setup
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Setup JDK
uses: actions/setup-java@v3
with:
distribution: temurin
java-version: '17' # Change this to the required Java version for your Android project
- name: Setup Gradle
uses: gradle/gradle-build-action@v2
with:
gradle-version: 7.4.2
- name: Setup Android NDK
uses: nttld/[email protected]
with:
ndk-version: r25c
- name: Grant execute permission for gradlew
run: chmod +x ./gradlew
build-debug:
name: Build debug
needs: [setup]
if: github.ref =='refs/heads/dev'
steps:
- name: Build debug APK
run: ./gradlew assembleDebug
- name: Upload APK artifact
uses: actions/upload-artifact@v2
with:
name: RECORDA-debug # Change this to your desired artifact name
path: ./app/build/outputs/apk/debug/*.apk
build-master:

Check failure on line 50 in .github/workflows/android_build.yml

View workflow run for this annotation

GitHub Actions / Android Build

Invalid workflow file

The workflow is not valid. .github/workflows/android_build.yml (Line: 50, Col: 5): Unexpected value 'build-master' .github/workflows/android_build.yml (Line: 38, Col: 5): Required property is missing: runs-on
name: Build master
needs: [setup]
if: github.ref == 'refs/heads/master'
steps:
- name: Build debug APK
run: ./gradlew assembleRelease
- name: Sign app APK
uses: r0adkll/sign-android-release@v1
# ID used to access action output
id: sign_app
with:
releaseDirectory: app/build/outputs/apk/release
signingKeyBase64: ${{ secrets.SIGNING_KEY }}
alias: ${{ secrets.SIGNING_KEY_ALIAS }}
keyStorePassword: ${{ secrets.KEY_STORE_PASSWORD }}
keyPassword: ${{ secrets.KEY_PASSWORD }}
- name: Upload APK artifact
uses: actions/upload-artifact@v2
with:
name: RECORDA-release # Change this to your desired artifact name
path: ${{steps.sign_app.outputs.signedReleaseFile}} # Change the path to the location of your APK file