Skip to content

chore: when releasing from main via GHA #152

chore: when releasing from main via GHA

chore: when releasing from main via GHA #152

Workflow file for this run

name: Build
on:
pull_request:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
name: Checkout code
with:
fetch-depth: 0
- name: Setup JDK
uses: actions/setup-java@v4
with:
java-version: 17
distribution: 'temurin'
cache: gradle
- name: Check for changes in app directory
id: check-changes
run: |
CHANGED=$(git diff --name-only origin/main...HEAD -- app/)
if [ -z "$CHANGED" ]; then
echo "No changes in app/ directory."
echo "skip-build-app=true" >> $GITHUB_ENV
fi
- name: Build and test SDK
if: env.skip-build-app == 'true'
run: ./gradlew unleashandroidsdk:build unleashandroidsdk:jacocoTestReport
- name: Build and test all
if: env.skip-build-app != 'true'
run: ./gradlew build jacocoTestReport
- name: Coveralls
uses: coverallsapp/github-action@v2
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
allow-empty: true
base-path: unleashandroidsdk/src/main/java