-
Notifications
You must be signed in to change notification settings - Fork 3
60 lines (57 loc) · 1.52 KB
/
build.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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
name: Build
on:
push:
branches:
- master
tags:
- '*'
env:
JAVA_TOOL_OPTIONS: >-
-XX:TieredStopAtLevel=1
-XX:+UseParallelGC
-Dstyle.color=always
-Djansi.force=true
jobs:
build:
name: Maven build
runs-on: ubuntu-20.04
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up JDK
uses: actions/setup-java@v4
with:
java-version: '11'
distribution: temurin
- name: Build with Maven
run: .github/scripts/build.sh
deploy:
name: Maven deploy
runs-on: ubuntu-20.04
needs: build
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up JDK
uses: actions/setup-java@v4
with:
java-version: '11'
distribution: temurin
- name: Install GPG key
run: |-
gpg --batch --import-options import-show --import << EOF
${{ secrets.GPG_KEY }}
EOF
- name: Deploy with Maven
run: .github/scripts/deploy.sh
env:
OSSRH_USER: ${{ secrets.OSSRH_USER }}
OSSRH_TOKEN: ${{ secrets.OSSRH_TOKEN }}
GPG_KEY_NAME: ${{ secrets.GPG_KEY_NAME }}
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
- name: Delete GPG secret key
if: ${{ always() }}
run: gpg --batch --yes --delete-secret-keys ${{ secrets.GPG_KEY_NAME }} || true
- name: Delete GPG public key
if: ${{ always() }}
run: gpg --batch --yes --delete-keys ${{ secrets.GPG_KEY_NAME }}