forked from flowpowered/network
-
Notifications
You must be signed in to change notification settings - Fork 7
38 lines (36 loc) · 1.01 KB
/
build_deploy.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
name: Build and Deploy
on:
push:
branches: [main]
paths:
- src/**
- pom.xml
- LICENSE.txt
- .github/workflows/build_deploy.yml
jobs:
build_deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up JDK
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: 17
server-id: glowstone-upstream
server-username: MAVEN_USERNAME
server-password: MAVEN_PASSWORD
- name: Cache
uses: actions/cache@v3
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-
- name: Cache Maven
run: mvn -T 1C -B dependency:go-offline
- name: Maven Build and Deploy
run: mvn -T 1C -B source:jar javadoc:jar deploy
env:
MAVEN_USERNAME: ${{ secrets.MAVEN_USERNAME }}
MAVEN_PASSWORD: ${{ secrets.MAVEN_PASSWORD }}