-
Notifications
You must be signed in to change notification settings - Fork 0
38 lines (36 loc) · 1.17 KB
/
deploy.yml
File metadata and controls
38 lines (36 loc) · 1.17 KB
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
name: Deploy artifacts
on:
workflow_run:
workflows: [ 'Build and test' ]
types: [ 'completed' ]
branches: [ 'develop', 'master', 'main' ]
jobs:
build:
name: Deploy
runs-on: ubuntu-latest
if: ${{ github.event.workflow_run.conclusion == 'success' }}
steps:
- name: Check out code
uses: actions/checkout@v6
- name: Set up JDK and Maven Central deployment
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: |
8
25
mvn-toolchain-id: |
jdk8
jdk25
cache: maven
server-id: central
server-username: MAVEN_CENTRAL_USERNAME
server-password: MAVEN_CENTRAL_TOKEN
gpg-passphrase: MAVEN_GPG_PASSPHRASE
gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY }}
- name: Publish to Apache Maven Central
env:
MAVEN_CENTRAL_USERNAME: ${{ secrets.SONATYPE_USER }}
MAVEN_CENTRAL_TOKEN: ${{ secrets.SONATYPE_PASSWORD }}
MAVEN_GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
run: ./mvnw --batch-mode --no-snapshot-updates deploy -DskipTests -DskipLicenseCheck