-
-
Notifications
You must be signed in to change notification settings - Fork 0
60 lines (54 loc) · 1.58 KB
/
release.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
name: Publish to Maven Central
on:
workflow_dispatch:
push:
tags:
- '*.*.*'
permissions:
contents: read
pages: write
id-token: write
concurrency:
group: "release"
cancel-in-progress: false
jobs:
publish:
runs-on: ubuntu-22.04
steps:
- name: Check out
uses: actions/checkout@v3
- name: Set up JDK 21
uses: actions/setup-java@v3
with:
distribution: zulu
java-version: 21
- name: Check
run: ./gradlew check --info --stacktrace
- name: Determine version
run: echo "VERSION=`./gradlew -q printVersion | tail -n 1`" >> $GITHUB_ENV
- name: Publish package
run: ./gradlew publish --info --stacktrace
env:
OSSRH_USERNAME: ${{ secrets.OSSRH_USERNAME }}
OSSRH_TOKEN: ${{ secrets.OSSRH_TOKEN }}
OSSRH_GPG_KEY: ${{ secrets.OSSRH_GPG_KEY }}
OSSRH_GPG_PASSWORD: ${{ secrets.OSSRH_GPG_PASSWORD }}
- name: Build docs
run: |
./gradlew dokkaHtmlMultiModule --info --stacktrace
mkdir -p ./build/pages/apidocs
cp -r ./build/dokka/htmlMultiModule ./build/pages/apidocs/latest
- name: Set up GitHub Pages
uses: actions/configure-pages@v3
- name: Upload artifact
uses: actions/upload-pages-artifact@v2
with:
path: ./build/pages
- name: Deploy to GitHub Pages
uses: actions/deploy-pages@v2
- name: Upload reports
uses: actions/upload-artifact@v3
with:
name: reports
path: '*/build/reports'
if: always()