-
-
Notifications
You must be signed in to change notification settings - Fork 12
61 lines (59 loc) · 2.02 KB
/
build.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
name: "build and publish docs"
on: [push, pull_request]
jobs:
build:
runs-on: "ubuntu-latest"
steps:
- name: "Checkout repository"
uses: "actions/[email protected]"
- name: "Set up JDK 17"
uses: "actions/[email protected]"
with:
java-version: "17"
distribution: "temurin"
- name: "Validate Gradle Wrapper"
uses: "gradle/[email protected]"
- name: "Build & Test"
uses: "gradle/[email protected]"
with:
# Don't bother starting and using a daemon for actions builds as it can't be reused
arguments: "build --no-daemon"
- name: "Archive Test Results"
if: "${{ always() }}"
uses: "actions/[email protected]"
with:
name: "test-results"
path: |
build/reports/
*/build/reports/
- name: "Upload to downloads API"
if: "github.event_name == 'push' && github.ref == 'refs/heads/master'"
run: "./gradlew uploadToApi"
env:
DOWNLOADS_API_TOKEN: "${{ secrets.DOWNLOADS_API_TOKEN }}"
- name: "Publish to Maven"
if: "github.event_name == 'push' && github.ref == 'refs/heads/master'"
run: "./gradlew publish"
env:
PUBLISH_USERNAME: "${{ secrets.PUBLISH_USERNAME }}"
PUBLISH_PASSWORD: "${{ secrets.PUBLISH_PASSWORD }}"
publish-docs:
if: "github.event_name == 'push' && github.ref_name == 'master'"
runs-on: "ubuntu-latest"
steps:
- name: "Checkout repository"
uses: "actions/[email protected]"
- name: "Set up JDK 17"
uses: "actions/[email protected]"
with:
java-version: 17
distribution: "temurin"
- name: "Generate documentation"
uses: "gradle/[email protected]"
with:
arguments: "dokkaHtml"
- name: "Deploy to pages"
uses: "JamesIves/[email protected]"
with:
branch: "docs"
folder: "api/build/dokka/html"