-
Notifications
You must be signed in to change notification settings - Fork 0
112 lines (93 loc) · 2.94 KB
/
continuous-integration.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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
name: CI Build
on:
push:
branches:
- 'main'
- 'feature/**'
pull_request:
branches:
- 'main'
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '17'
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v4
- name: Build with Gradle Wrapper
run: ./gradlew build
- name: Sonarqube
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
run: ./gradlew detekt koverXmlReport sonar
release:
runs-on: ubuntu-latest
permissions:
contents: write
if: github.ref == 'refs/heads/main'
steps:
- uses: actions/checkout@v4
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '17'
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v4
- name: Semantic Release Prepare
uses: codfish/semantic-release-action@v3
with:
plugins: |
['@semantic-release/commit-analyzer']
dry-run: true
id: semantic-prepare
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Build with Gradle Wrapper
run: |
./gradlew clean assemble publish -Pversion=${{ steps.semantic-prepare.outputs.release-version }} --no-configuration-cache
env:
ORG_GRADLE_PROJECT_signingInMemoryKey: ${{ secrets.GPG_SIGNING_KEY }}
ORG_GRADLE_PROJECT_mavenCentralUsername: ${{ secrets.MAVEN_CENTRAL_USER }}
ORG_GRADLE_PROJECT_mavenCentralPassword: ${{ secrets.MAVEN_CENTRAL_PWD }}
- name: Semantic Release
uses: codfish/semantic-release-action@v3
with:
additional-packages: |
['@semantic-release/github', '@semantic-release/exec']
plugins: |
[
'@semantic-release/commit-analyzer',
'@semantic-release/release-notes-generator',
'@semantic-release/github'
]
id: semantic-release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Build and generate documentation
run: ./gradlew prepareDocs --no-configuration-cache
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./docs
dependency-submission:
runs-on: ubuntu-latest
permissions:
contents: write
if: github.ref == 'refs/heads/main'
steps:
- uses: actions/checkout@v4
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '17'
- name: Generate and submit dependency graph
uses: gradle/actions/dependency-submission@v4