-
Notifications
You must be signed in to change notification settings - Fork 0
44 lines (41 loc) · 1.53 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
# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.
# GitHub recommends pinning actions to a commit SHA.
# To get a newer version, you will need to update the SHA.
# You can also reference a tag or branch, but the action may change without warning.
name: Publish package to the Maven Central Repository
on:
release:
types: [created]
push:
branches: ["**"]
jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Java
uses: actions/setup-java@v4
with:
java-version: '21'
distribution: 'temurin'
- name: Validate Gradle wrapper
uses: gradle/wrapper-validation-action@88425854a36845f9c881450d9660b5fd46bee142
- name: Build
run: ./gradlew build --stacktrace
- name: Publish
if: ${{ github.event_name == 'push' && !startsWith(github.ref, 'renovate/**') }}
run: ./gradlew publish --stacktrace
env:
SONATYPE_USERNAME: ${{ secrets.OSSRH_USERNAME }}
SONATYPE_PASSWORD: ${{ secrets.OSSRH_TOKEN }}
ORG_GRADLE_PROJECT_signingKey: ${{ secrets.SIGNING_KEY }}
ORG_GRADLE_PROJECT_signingPassword: ${{ secrets.SIGNING_PASSWORD }}
- name: Generate javadocs
run: ./gradlew alljavadoc --stacktrace
- name: Deploy 🚀
uses: JamesIves/github-pages-deploy-action@v4
with:
folder: build/docs/javadoc