-
Notifications
You must be signed in to change notification settings - Fork 0
68 lines (61 loc) · 2.01 KB
/
publish.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
name: Publish
on:
push:
tags: [ 'v*' ]
branches: [ main ]
env:
ORG_GRADLE_PROJECT_signingInMemoryKey: ${{ secrets.ORG_GRADLE_PROJECT_signingInMemoryKey }}
ORG_GRADLE_PROJECT_signingInMemoryKeyPassword: ${{ secrets.ORG_GRADLE_PROJECT_signingInMemoryKeyPassword }}
ORG_GRADLE_PROJECT_mavenCentralPassword: ${{ secrets.ORG_GRADLE_PROJECT_mavenCentralPassword }}
ORG_GRADLE_PROJECT_mavenCentralUsername: ${{ secrets.ORG_GRADLE_PROJECT_mavenCentralUsername }}
jobs:
publish:
strategy:
matrix:
os: [ macos-latest ]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4
- uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: 11
- name: Cache Build files
uses: actions/cache@v4
if: ${{ !startsWith(matrix.os, 'windows') }}
with:
path: |
~/.konan
~/.gradle
key: ${{ runner.os }}-${{ hashFiles('gradle.properties') }}-v1
- uses: gradle/gradle-build-action@v3
name: Publish
with:
arguments: clean publishAllPublicationsToMavenCentralRepository
publish-docs:
name: Publish KDoc to Github Pages
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags/v')
steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4
- uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: 11
- name: Cache Build files
uses: actions/cache@v4
with:
path: |
~/.konan
~/.gradle
key: ${{ runner.os }}-${{ hashFiles('gradle.properties') }}
- uses: gradle/gradle-build-action@v3
name: Build Docs
with:
arguments: clean dokkaHtmlMultiModule
- name: Publish Docs
uses: JamesIves/[email protected]
with:
branch: docs
folder: build/dokka/htmlMultiModule
single-commit: true