-
-
Notifications
You must be signed in to change notification settings - Fork 0
55 lines (52 loc) · 1.67 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
# This workflow will build a Java project with Gradle
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-gradle
name: CI
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
build:
name: ${{ matrix.os }} / OpenJDK ${{ matrix.jdk }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
jdk: ['21']
os: [ubuntu-latest]
steps:
- uses: actions/checkout@v4
- name: Set up JDK ${{ matrix.jdk }}
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: ${{ matrix.jdk }}
cache: gradle
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Build with Gradle
run: ./gradlew build
# - name: SonarQube
# if: ${{ matrix.jdk == '21' }}
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
# run: ./gradlew sonarqube -PsonarToken=${{ secrets.SONAR_TOKEN }}
# deploy:
# if: ${{ github.event_name != 'pull_request' }}
# needs: [ build ]
# runs-on: ubuntu-latest
# name: Deploy
# steps:
# - uses: actions/checkout@v4
# - name: Set up JDK
# uses: actions/setup-java@v4
# with:
# distribution: temurin
# java-version: '21'
# - name: Deploy
# env:
# ORG_GRADLE_PROJECT_signingKey: ${{ secrets.GPG_SIGNING_KEY }}
# ORG_GRADLE_PROJECT_signingPassword: ${{ secrets.GPG_PASSPHRASE }}
# ORG_GRADLE_PROJECT_sonatypeUsername: ${{ secrets.OSSRH_USERNAME }}
# ORG_GRADLE_PROJECT_sonatypePassword: ${{ secrets.OSSRH_PASSWORD }}
# run: ./gradlew publish --no-daemon