-
Notifications
You must be signed in to change notification settings - Fork 8
103 lines (84 loc) · 2.71 KB
/
ci.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
92
93
94
95
96
97
98
99
100
101
102
103
name: ci
on:
pull_request: {}
push:
branches:
- master
permissions:
contents: write
jobs:
build:
runs-on: ubuntu-latest
name: Build Ackpine
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Validate Gradle wrapper
uses: gradle/wrapper-validation-action@v1
- name: Set up JDK
uses: actions/setup-java@v3
with:
distribution: adopt
java-version: 17
- name: Validate binary compatibility
run: |
./gradlew apiCheck || { exit_code=$?; printf "*** This PR changes Ackpine's public API. If this is intentional, run './gradlew apiDump' and commit the new API dumps. ***"; exit $exit_code; }
- name: Build
run: |
./gradlew buildAckpine --stacktrace
publish:
name: Upload artifacts
runs-on: ubuntu-latest
if: github.repository == 'solrudev/Ackpine' && github.ref == 'refs/heads/master' && !contains(github.event.head_commit.message, '[docs]')
needs: [build]
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up JDK
uses: actions/setup-java@v3
with:
distribution: adopt
java-version: 17
- name: Publish
run: |
./gradlew publishReleasePublicationToSonatypeRepository --max-workers 1 closeAndReleaseSonatypeStagingRepository
env:
OSSRH_USERNAME: ${{ secrets.OSSRH_USERNAME }}
OSSRH_PASSWORD: ${{ secrets.OSSRH_PASSWORD }}
SIGNING_KEY_ID: ${{ secrets.SIGNING_KEY_ID }}
SIGNING_PASSWORD: ${{ secrets.SIGNING_PASSWORD }}
SIGNING_KEY: ${{ secrets.SIGNING_KEY }}
SONATYPE_STAGING_PROFILE_ID: ${{ secrets.SONATYPE_STAGING_PROFILE_ID }}
publish-docs:
name: Publish documentation
runs-on: ubuntu-latest
if: github.repository == 'solrudev/Ackpine' && github.ref == 'refs/heads/master'
needs: [build]
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up JDK
uses: actions/setup-java@v3
with:
distribution: adopt
java-version: 17
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3.11.4
- name: Prepare API docs
run: |
./gradlew dokkaHtmlMultiModule
- name: Build MkDocs
run: |
pip3 install --upgrade pip && pip3 install -v "mkdocs-material==9.3.2" && pip3 install mkdocs-minify-plugin
mkdocs build
- name: Deploy docs
if: success()
uses: JamesIves/github-pages-deploy-action@releases/v3
with:
BRANCH: gh-pages
FOLDER: site
SINGLE_COMMIT: true