-
Notifications
You must be signed in to change notification settings - Fork 0
37 lines (33 loc) · 959 Bytes
/
maven.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
---
name: build
on:
push:
branches: [main]
pull_request:
branches: [main]
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: 17
server-id: vpro-ossrh
server-username: SONATYPE_USERNAME
server-password: SONATYPE_PASSWORD
gpg-private-key: ${{ secrets.GPG_SECRET_KEY }}
gpg-passphrase: GPG_SECRET_KEY_PASSPHRASE
cache: maven
- name: Build with Maven
run: mvn -ntp -B -fn
if: ${{ github.event_name == 'push' }}
- name: Deploy with Maven
run: mvn -ntp -B -Pdeploy deploy -DskipTests=true
if: ${{ github.event_name == 'push' }}
env:
SONATYPE_USERNAME: vpro
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
GPG_SECRET_KEY_PASSPHRASE: ${{ secrets.GPG_SECRET_KEY_PASSPHRASE }}