-
-
Notifications
You must be signed in to change notification settings - Fork 28
40 lines (40 loc) · 1.21 KB
/
gradle.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
38
39
40
name: Java CI with Gradle
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
java-version: [ 17 ]
fail-fast: true
steps:
- uses: actions/checkout@v3
- name: Setup JDK ${{ matrix.java-version }}
uses: actions/setup-java@v3
with:
distribution: temurin
java-version: ${{ matrix.java-version }}
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- uses: actions/cache@v3
with:
path: '**/.gradle'
key: ${{ runner.os }}-gradle-${{ secrets.CACHE_VERSION }}-${{ hashFiles('**/VersionConstants.kt', '**/build.gradle.kts', '**/gradle-wrapper.properties') }}
- name: Build
run: ./gradlew clean build --stacktrace
- name: Upload artififacts
uses: actions/upload-artifact@v3
with:
name: Insights
path: jars/*.jar
retention-days: 90
- name: Publish
if: ${{ github.event_name == 'push' }}
env:
FVDH_USERNAME: ${{ secrets.FVDH_USERNAME }}
FVDH_TOKEN: ${{ secrets.FVDH_TOKEN }}
run: ./gradlew publish --stacktrace