summaryrefslogtreecommitdiff
path: root/.github/workflows/ci.yml
blob: 951e3acd51d184276f461d94d7c3017555d6adcc (plain)
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
39
40
41
42
name: CI Build

on:
  push:
    branches: [ master ]
  pull_request:
    branches: [ master ]

jobs:
  build:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v2
    - name: Set up JDK 13
      uses: actions/setup-java@v1.3.0
      with:
        java-version: 13

    - name: Gradle build cache
      uses: actions/cache@v1
      with:
        path: ~/.gradle/caches
        key: ${{ runner.os }}-gradle-build-${{ hashFiles('**/*.gradle*') }}
        restore-keys: ${{ runner.os }}-gradle-build-

    - name: Gradle wrapper cache
      uses: actions/cache@v1
      with:
        path: ~/.gradle/wrapper
        key: ${{ runner.os }}-gradle-wrapper-${{ hashFiles('**/gradle-wrapper.properties') }}

    - name: Build with Gradle
      run: ./gradlew build

# When Travis CI doesn't publish on tags anymore:

#  publish:
#    needs: build
#    if: startsWith(github.ref, 'refs/tags/')
#    steps:
#      - name: Publish to Bintray
#        run: ./gradlew bintrayUpload
bgstack15