-
Notifications
You must be signed in to change notification settings - Fork 14
37 lines (35 loc) · 1.01 KB
/
build.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
name: CommCare Core Build
on:
push:
branches:
- 'master'
- 'formplayer'
pull_request:
branches:
- 'master'
- 'formplayer'
jobs:
build:
runs-on: ubuntu-latest
env:
JAVA_VERSION: '17'
JOB_GRADLE_VERSION: 8.1
FORMPLAYER_GRADLE_VERSION: 8.1
FORMPLAYER_JAVA_VERSION: '17'
steps:
- uses: actions/checkout@v3
- name: Set environment for Formplayer
if: ${{ github.ref_name == 'formplayer' || github.base_ref == 'formplayer' }}
run: |
echo "JOB_GRADLE_VERSION=${{ env.FORMPLAYER_GRADLE_VERSION }}" >> "$GITHUB_ENV"
echo "JAVA_VERSION=${{ env.FORMPLAYER_JAVA_VERSION }}" >> "$GITHUB_ENV"
- name: Set up Java
uses: actions/setup-java@v3
with:
java-version: ${{ env.JAVA_VERSION }}
distribution: 'adopt'
- name: Build with Gradle
uses: gradle/gradle-build-action@v2
with:
gradle-version: ${{ env.JOB_GRADLE_VERSION }}
arguments: build