forked from primefaces-extensions/primefaces-extensions
-
Notifications
You must be signed in to change notification settings - Fork 0
49 lines (44 loc) · 1.61 KB
/
build.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
name: Java CI
on: [ push, pull_request ]
env:
MAVEN_OPTS: >-
-Dmaven.wagon.httpconnectionManager.ttlSeconds=120
permissions:
contents: read
jobs:
build:
runs-on: ubuntu-latest
name: Java ${{ matrix.java }}
strategy:
matrix:
java: [ 11, 17 ]
steps:
- uses: actions/checkout@v4
- name: Set up JDK ${{ matrix.java }}
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: ${{ matrix.java }}
- name: Cache Maven packages
uses: actions/cache@v4
with:
path: ~/.m2
key: ${{ runner.os }}-v3-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-v3
# - name: Checkout PrimeFaces
# uses: actions/checkout@v4
# with:
# repository: primefaces/primefaces
# path: primefaces
# - name: Build PrimeFaces
# run: cd primefaces && mvn -U install -Pquick && cd ..
- name: Log github.ref
run: echo "${{ github.ref }}"
- name: Build with Maven
run: mvn -B -V -U clean install -T1C -Pcompress --batch-mode --show-version
- name: SonarCloud
if: github.repository =='primefaces-extensions/primefaces-extensions' && github.ref == 'refs/heads/master' && matrix.java == 17
run: mvn sonar:sonar -Dsonar.projectKey=org.primefaces.extensions:primefaces-extensions-parent -Dsonar.organization=pr1m3fac3sext3ns1ons -Dsonar.host.url=https://sonarcloud.io -Dsonar.login=${{secrets.SONAR_TOKEN}}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}