-
-
Notifications
You must be signed in to change notification settings - Fork 23
82 lines (81 loc) · 2.64 KB
/
release.yaml
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
# This file was generated using Kotlin DSL (.github/workflows/release.main.kts).
# If you want to modify the workflow, please change the Kotlin file and regenerate this YAML file.
# Generated with https://github.com/typesafegithub/github-workflows-kt
name: 'Release'
on:
push:
tags:
- 'v*.*.*'
env:
SIGNING_KEY: '${{ secrets.SIGNING_KEY }}'
SIGNING_PASSWORD: '${{ secrets.SIGNING_PASSWORD }}'
ORG_GRADLE_PROJECT_sonatypeUsername: '${{ secrets.ORG_GRADLE_PROJECT_SONATYPEUSERNAME }}'
ORG_GRADLE_PROJECT_sonatypePassword: '${{ secrets.ORG_GRADLE_PROJECT_SONATYPEPASSWORD }}'
jobs:
check_yaml_consistency:
name: 'Check YAML consistency'
runs-on: 'ubuntu-latest'
steps:
- id: 'step-0'
name: 'Check out'
uses: 'actions/checkout@v3'
- id: 'step-1'
name: 'Execute script'
run: 'rm ''.github/workflows/release.yaml'' && ''.github/workflows/release.main.kts'''
- id: 'step-2'
name: 'Consistency check'
run: 'git diff --exit-code ''.github/workflows/release.yaml'''
release:
runs-on: 'ubuntu-latest'
needs:
- 'check_yaml_consistency'
steps:
- id: 'step-0'
uses: 'actions/checkout@v3'
- id: 'step-1'
name: 'Set up JDK'
uses: 'actions/setup-java@v3'
with:
java-version: '11'
distribution: 'zulu'
cache: 'gradle'
- id: 'step-2'
name: 'Build'
uses: 'gradle/gradle-build-action@v2'
with:
arguments: 'build'
- id: 'step-3'
uses: 'actions/setup-python@v4'
with:
python-version: '3.8'
- id: 'step-4'
name: 'Publish to Sonatype'
uses: 'gradle/gradle-build-action@v2'
with:
arguments: ':library:publishToSonatype closeAndReleaseSonatypeStagingRepository'
- id: 'step-5'
name: 'Wait until library present in Maven Central'
uses: 'gradle/gradle-build-action@v2'
with:
arguments: ':library:waitUntilLibraryPresentInMavenCentral'
- id: 'step-6'
run: 'pip install -r docs/requirements.txt'
- id: 'step-7'
name: 'Build Mkdocs docs'
run: 'mkdocs build --site-dir to-gh-pages'
- id: 'step-8'
name: 'Generate API docs'
uses: 'gradle/gradle-build-action@v2'
with:
arguments: ':library:dokkaHtml'
- id: 'step-9'
name: 'Prepare target directory for API docs'
run: 'mkdir -p to-gh-pages/api-docs'
- id: 'step-10'
name: 'Copy Dokka output to Mkdocs output'
run: 'cp -r library/build/dokka/html/* to-gh-pages/api-docs'
- id: 'step-11'
name: 'Deploy merged docs to GitHub Pages'
uses: 'JamesIves/github-pages-deploy-action@v4'
with:
folder: 'to-gh-pages'