-
Notifications
You must be signed in to change notification settings - Fork 16
39 lines (32 loc) · 1.05 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
name: Build
on:
release:
types: [published]
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up JDK
uses: actions/setup-java@v3
with:
java-version: '21'
distribution: 'temurin'
cache: maven
server-id: central
server-username: CENTRAL_USERNAME
server-password: CENTRAL_TOKEN
gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY }}
gpg-passphrase: GPG_PASSPHRASE
- name: Initialize Paper NMS
run: for file in $(grep -l '<artifactId>paper-nms</artifactId>' $(find -name 'pom.xml')); do mvn -B paper-nms:init --file "$file"; done
- name: Build the dependencies of the api
run: mvn -B install --file pom.xml -pl '!api'
- name: Build and deploy the api
working-directory: ./api
run: mvn -B deploy --file pom.xml
env:
CENTRAL_USERNAME: ${{ secrets.CENTRAL_USERNAME }}
CENTRAL_TOKEN: ${{ secrets.CENTRAL_TOKEN }}
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}