-
Notifications
You must be signed in to change notification settings - Fork 3
91 lines (90 loc) · 2.73 KB
/
ci.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
name: CI
on:
push:
pull_request:
jobs:
validate:
name: Validate Gradle Wrapper
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- uses: gradle/wrapper-validation-action@v1
name: Validate Gradle Wrapper
test:
strategy:
matrix:
os: [ ubuntu-latest, macos-latest ]
runs-on: ${{ matrix.os }}
needs: validate
name: Run tests and linter
steps:
- uses: actions/checkout@v3
- uses: actions/setup-java@v3
with:
distribution: 'temurin' # See 'Supported distributions' for available options
java-version: '19'
- uses: gradle/gradle-build-action@v2
name: Validate Code
with:
arguments: classes check -x apiCheck
validate_binary_compatibility:
runs-on: ubuntu-20.04
needs: validate
name: Run binary compatibility validator
steps:
- uses: actions/checkout@v3
- uses: actions/setup-java@v3
with:
distribution: 'temurin' # See 'Supported distributions' for available options
java-version: '19'
- uses: gradle/gradle-build-action@v2
name: Validate Binary Compatibility
with:
arguments: apiCheck
deploy_to_maven:
name: Deploy to Maven repo
strategy:
matrix:
os: [ ubuntu-latest, macos-latest ]
runs-on: ${{ matrix.os }}
needs: [test, validate_binary_compatibility]
if: github.ref == 'refs/heads/main'
env:
SONATYPE_KEY: ${{ secrets.SONATYPE_KEY }}
SONATYPE_USER: ${{ secrets.SONATYPE_USER }}
ORG_GRADLE_PROJECT_signingKey: ${{ secrets.signingKey }}
ORG_GRADLE_PROJECT_signingPassword: ${{ secrets.signingPassword }}
steps:
- uses: actions/checkout@v3
- uses: actions/setup-java@v3
with:
distribution: 'temurin' # See 'Supported distributions' for available options
java-version: '19'
- uses: gradle/gradle-build-action@v2
name: Publish Code
with:
arguments: publishPlatformPublications -x check
deploy_docs:
name: Deploy docs
runs-on: ubuntu-20.04
needs: [test, validate_binary_compatibility]
if: github.ref == 'refs/heads/main'
steps:
- uses: actions/checkout@v3
- uses: actions/setup-java@v3
with:
distribution: 'temurin' # See 'Supported distributions' for available options
java-version: '19'
- uses: gradle/gradle-build-action@v2
name: Generate Docs
with:
arguments: dokkaHtmlMultiModule
- name: Deploy Docs
uses: JamesIves/[email protected]
with:
branch: gh-pages
folder: docs
clean: true
clean-exclude: |
.nojekyll
CNAME