-
Notifications
You must be signed in to change notification settings - Fork 0
51 lines (41 loc) · 1.38 KB
/
ci.yaml
File metadata and controls
51 lines (41 loc) · 1.38 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
name: "Continuous Integration"
on: [push]
jobs:
build:
name: "CI"
runs-on: ubuntu-24.04
steps:
- name: "Checkout"
uses: actions/checkout@v6
with:
# full history is required for versioning and changelog generation
fetch-depth: 0
- name: "Set up JDK"
uses: actions/setup-java@v5
with:
distribution: 'corretto'
java-version: '21'
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v6
with:
gradle-version: wrapper
# disable reading from cache on re-runs to fix possible caching issues
cache-write-only: ${{ fromJSON(github.run_attempt) != 1 }}
- name: "Build"
run: ./gradlew assemble --scan --console=plain --build-cache
- name: "Test"
run: ./gradlew check --scan --console=plain --build-cache
- name: "Publish Test Report"
uses: mikepenz/action-junit-report@v6
if: ${{ failure() }}
with:
report_paths: "**/build/test-results/**/TEST-*.xml"
require_tests: false
- name: "Publish (Pre-) Release"
if: ${{ github.ref == 'refs/heads/main' }}
env:
JRELEASER_CONFIG_CONTENT: ${{ secrets.JRELEASER_CONFIG_CONTENT }}
run: |
mkdir -p ~/.jreleaser
echo "$JRELEASER_CONFIG_CONTENT" > ~/.jreleaser/config.toml
./gradlew publish jreleaserFullRelease --scan --console=plain --build-cache