-
Notifications
You must be signed in to change notification settings - Fork 1
42 lines (36 loc) · 1.13 KB
/
maven_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
name: '[ PUBLISH ] Release build with maven'
on:
workflow_call:
inputs:
build_version:
description: 'The version to be published'
type: string
required: true
Publish:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup JDK
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 17
cache: 'maven'
cache-dependency-path: '**/pom.xml'
server-id: 'central'
server-username: ${{ secrets.SONATYPE_CENTRAL_USERNAME }}
server-password: ${{ secrets.SONATYPE_CENTRAL_PASSWORD }}
- name: Download build artifacts
uses: actions/download-artifact@v4
with:
name: build-artifacts
- name: Display structure of downloaded files
run: tree
- name: Publish to Maven Central
run: ./mvnw deploy -DskipTests=true -Dmaven.javadoc.skip=true -B -V
- name: Debug
if: ${{ failure() }}
run: |
echo "Failed"
tree