-
Notifications
You must be signed in to change notification settings - Fork 5
38 lines (30 loc) · 1.23 KB
/
pullrequest.yml
File metadata and controls
38 lines (30 loc) · 1.23 KB
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
38
name: Build # name of the workflow
on:
pull_request: # specifies events to trigger the workflow
branches: [ main, develop ] # branches that trigger the workflow
jobs: # groups the jobs to be executed in this workflow
build: # defines a job called build
name: 🔨 Build # [optional] name of the job
runs-on: ubuntu-latest # the job will be executed on ubuntu runner. Other include: Microsoft Windows & MacOS runners
steps: # groups together all the steps that run in build job
- name: Checkout code # [optional] specifies the name of the step
uses: actions/checkout@v2 # specifies which version of action to run
- name: Set up JDK 11
uses: actions/setup-java@v1
with:
java-version: 11
- name: Make gradlew executable
run: chmod +x ./gradlew
- name: Build with gradle
run: ./gradlew build
- name: Cache Gradle and wrapper
uses: actions/cache@v2
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }}
restore-keys: |
${{ runner.os }}-gradle-
- name: Build with Gradle
run: bash ./gradlew build