-
Notifications
You must be signed in to change notification settings - Fork 34
52 lines (52 loc) · 1.92 KB
/
main.yml
File metadata and controls
52 lines (52 loc) · 1.92 KB
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
name: 'reactive-commons-ci-cd'
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
build:
if: ${{ !contains(github.event.head_commit.message, '[skip ci]') }}
permissions:
contents: write
issues: write
pull-requests: write
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Verify Conventional Commits
uses: amannn/action-semantic-pull-request@v5
if: github.event_name == 'pull_request' || github.event_name == 'pull_request_target'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Set up NodeJS
if: github.ref == 'refs/heads/master'
uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
- name: Set up Semantic Release
if: github.ref == 'refs/heads/master'
run: npm -g install @semantic-release/git semantic-release@23.0.0
- name: Semantic Release
if: github.ref == 'refs/heads/master'
run: npx semantic-release@23.0.0
env:
GITHUB_TOKEN: ${{ secrets.PA_TOKEN }}
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
distribution: temurin
java-version: 17
- name: Execute build test jacocoTestReport and sonar analysis
if: endsWith(github.REF, '/master') == true || github.event.pull_request.head.repo.fork == false
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
run: ./gradlew clean build generateMergedReport sonar --refresh-dependencies --no-daemon --continue -Denv.ci=true
- name: Execute build test jacocoTestReport pull request
if: github.event.pull_request.head.repo.fork == true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: ./gradlew clean build generateMergedReport --refresh-dependencies --no-daemon --continue -Denv.ci=true