-
Notifications
You must be signed in to change notification settings - Fork 12
91 lines (76 loc) · 2.81 KB
/
deploy.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: Build
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
permissions:
contents: read
pages: write
id-token: write
jobs:
build:
strategy:
matrix:
config: [
{ target: android, os: ubuntu-latest, tasks: testDebugUnitTest, continueOnError: false },
{ target: apple, os: macos-latest, tasks: iosX64Test iosSimulatorArm64Test, continueOnError: false },
{ target: nodejs, os: ubuntu-latest, tasks: jsNodeTest, continueOnError: false },
{ target: desktop, os: ubuntu-latest, tasks: jvmTest, continueOnError: false },
]
runs-on: ${{ matrix.config.os }}
name: Build ${{ matrix.config.target }}
steps:
- uses: actions/checkout@v3
- name: Setup JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'
- name: Setup gradle
uses: gradle/gradle-build-action@v2
- name: Test ${{ matrix.config.target }} targets
continue-on-error: ${{ matrix.config.continueOnError }}
run: ./gradlew ${{ matrix.config.tasks }}
release:
if: ${{ github.event_name != 'pull_request' }}
runs-on: macos-latest
needs:
- build
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- uses: actions/checkout@v3
- name: Setup JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'
- name: Setup gradle
uses: gradle/gradle-build-action@v2
- name: Setup Pages
uses: actions/configure-pages@v3
# - name: Write secrets to local.properties
# if: ${{ github.event_name != 'pull_request' }}
# run: |
# echo mavenCentralUsername="${SONATYPE_USERNAME}" >> "local.properties"
# echo mavenCentralUsername="${SONATYPE_PASSWORD}" >> "local.properties"
# echo gpgKeyPassword="${GPG_KEY_PASSWORD}" >> "local.properties"
# echo gpgKeySecret="${GPG_KEY_SECRET}" >> "local.properties"
# env:
# SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
# SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
# GPG_KEY_PASSWORD: ${{ secrets.GPG_KEY_PASSWORD }}
# GPG_KEY_SECRET: ${{ secrets.GPG_KEY_SECRET }}
# - name: Release to sonatype
# run: ./gradlew publishAllPublicationsToMavenRepository
- name: Generate docs with dokka
run: ./gradlew dokkaHtmlMultiModule
- name: Upload artifact
uses: actions/upload-pages-artifact@v1
with:
path: ${{ github.workspace }}/build/dokka/htmlMultiModule
- name: Release to GitHub Pages
id: deployment
uses: actions/deploy-pages@v1