This repository has been archived by the owner on Mar 3, 2020. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 2
63 lines (60 loc) · 1.74 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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
name: Java CI
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
gradle: ['5.6', '6.0', '6.1', '6.2']
steps:
- uses: actions/checkout@722adc6
with:
fetch-depth: 0
- name: Set up JDK 11
uses: actions/setup-java@081536e
with:
java-version: 11
- name: Set up Node.js 12
uses: actions/setup-node@8de2f9f
with:
node-version: 12
- uses: actions/cache@cffae95
with:
path: ~/.gradle/caches
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }}
restore-keys: |
${{ runner.os }}-gradle-
- name: Gradle Wrapper Validation
uses: gradle/wrapper-validation-action@v1
- name: Build with Gradle
run: ./gradlew build --no-daemon -Dsnom.test.functional.gradle=${{ matrix.gradle }}
- name: Run Semantic Release
run: |
echo "gradle.publish.key=${{ secrets.GRADLE_PUBLISH_KEY }}" > ~/.gradle/gradle.properties
echo "gradle.publish.secret=${{ secrets.GRADLE_PUBLISH_SECRET }}" >> ~/.gradle/gradle.properties
rm -rf build/libs/*.jar
npm ci
npm run semantic-release
if: matrix.gradle == '6.0'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Run SonarQube Scanner
run: |
if [ "$SONAR_LOGIN" != "" ]; then
./gradlew sonarqube -Dsonar.login=$SONAR_LOGIN --no-daemon
fi
if: matrix.gradle == '6.0'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_LOGIN: ${{ secrets.SONAR_LOGIN }}
- uses: actions/upload-artifact@3446296
if: always()
with:
name: reports
path: build/reports