-
Notifications
You must be signed in to change notification settings - Fork 0
49 lines (41 loc) · 1.33 KB
/
ci-cd.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: CI/CD
on:
# Triggers the workflow on push or pull request events but only for the "main" branch
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up JDK
uses: actions/setup-java@v1.4.4
with:
java-version: 17
- name: Cache Gradle packages
uses: actions/cache@v1.2.1
with:
path: ~/.gradle/caches
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }}
restore-keys: ${{ runner.os }}-gradle
- name: Cache SonarCloud packages
uses: actions/cache@v1.2.1
with:
path: ~/.sonar/cache
key: ${{ runner.os }}-sonar
restore-keys: ${{ runner.os }}-sonar
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Build with Gradle
env:
REPOSITORY_SNAPSHOTS_URL: ${{ vars.REPOSITORY_SNAPSHOTS_URL }}
REPOSITORY_RELEASES_URL: ${{ vars.REPOSITORY_RELEASES_URL }}
REPOSITORY_USERNAME: ${{ secrets.REPOSITORY_USERNAME }}
REPOSITORY_PASSWORD: ${{ secrets.REPOSITORY_PASSWORD }}
run: ./gradlew build publish -Dkotest.tags="Unit | Component"