-
Notifications
You must be signed in to change notification settings - Fork 826
44 lines (37 loc) · 1.33 KB
/
build-master.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
name: Build master branch
on:
push:
branches:
- master
jobs:
build:
name: Build on java ${{ matrix.java }}
runs-on: ubuntu-latest
strategy:
matrix:
java: ['17']
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Validate Gradle wrapper
uses: gradle/wrapper-validation-action@v3
- name: Set up java ${{ matrix.java }}
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: ${{ matrix.java }}
check-latest: true
- name: Decrypt file
run: openssl aes-256-cbc -K ${{ secrets.ENCRYPTED_KEY }} -iv ${{ secrets.ENCRYPTED_IV }} -in private.key.enc -out ./private.key -d && gpg --batch --import ./private.key || echo
- name: Build with Gradle
uses: gradle/actions/setup-gradle@v3
with:
arguments: --scan --stacktrace --warning-mode=all build
- name: Deploy with Gradle
if: ${{ matrix.java == '17' }}
uses: gradle/actions/setup-gradle@v3
with:
arguments: --scan publish -x check -Psigning.gnupg.executable=gpg -Psigning.gnupg.keyName=${{ secrets.GPG_NAME }} -Psigning.gnupg.passphrase=${{ secrets.GPG_PASSWORD }}
env:
OSSRH_USER: ${{ secrets.OSSRH_USER }}
OSSRH_PASS: ${{ secrets.OSSRH_PASS }}