-
Notifications
You must be signed in to change notification settings - Fork 0
43 lines (38 loc) · 1.16 KB
/
publish-mavencentral.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
name: Build and push to MavenCentral
on:
push:
tags:
- 1.*
jobs:
publish:
runs-on: ubuntu-latest
permissions:
contents: write
packages: write
steps:
- name: Set up Java
uses: actions/setup-java@v4
with:
java-version: '21'
distribution: 'temurin'
- name: Checkout
uses: actions/checkout@v4
- name: Setup Gradle
uses: gradle/actions/setup-gradle@cc4fc85e6b35bafd578d5ffbc76a5518407e1af0
# v4
with:
validate-wrappers: true
- name: Build release
run: ./gradlew javadoc publish -s -Pversion=${BUILD_LABEL//\//_}
env:
BUILD_LABEL: ${{ github.head_ref || github.ref_name }}
- name: Upload and Release Bundle
uses: jskov/action-nexus-publish@e02fa0f6309eec0fe0fee666f6242966ed32b997
# v1.1
with:
ossrh_username: ${{ secrets.OSSRH_USERNAME }}
ossrh_token: ${{ secrets.OSSRH_TOKEN }}
signing_key: ${{ secrets.SIGNING_KEY }}
signing_key_secret: ${{ secrets.SIGNING_KEY_SECRET }}
search_directory: build/dist
target_action: 'promote_or_keep'