-
Notifications
You must be signed in to change notification settings - Fork 1
40 lines (34 loc) · 1.02 KB
/
publish-release.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
name: Publish-release
on:
push:
tags:
- '*'
jobs:
publish-release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '17'
server-id: github
settings-path: ${{ github.workspace }}
- name: Cache m2 repo
uses: actions/cache@v3
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-
- name: Build
run: mvn clean install
- name: Publish to sonatype
run: ./.github/scripts/push-to-nexus.sh
env:
BUILD_ENV: 'github-actions'
NEXUS_USERNAME: ${{ secrets.NEXUS_USERNAME }}
NEXUS_PASSWORD: ${{ secrets.NEXUS_PASSWORD }}
GPG_KEYNAME: ${{ secrets.GPG_KEYNAME }}
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
GPG_SIGNING_KEY: ${{ secrets.GPG_SIGNING_KEY }}