-
Notifications
You must be signed in to change notification settings - Fork 3
44 lines (35 loc) · 1.13 KB
/
build-server-jar.yml
File metadata and controls
44 lines (35 loc) · 1.13 KB
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
# This workflow buils mapmap-server JAR files and publish them. Also upload the artifact so other actions can use it.
name: Build Server JAR
on:
workflow_call
jobs:
build-jar:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@v3
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'
cache: maven
server-id: github
settings-path: ${{ github.workspace }}/mapmap-server
- name: Build with Maven
run: mvn -B package --file mapmap-server/pom.xml -Dmaven.test.skip
- name: Publish to GitHub Packages Apache Maven
run: mvn deploy --file mapmap-server/pom.xml -s $GITHUB_WORKSPACE/mapmap-server/settings.xml -Dmaven.test.skip
env:
GITHUB_TOKEN: ${{ github.token }}
- name: Rename JAR
run: |
mv "mapmap-server/target/mapmap-server-0.0.1-SNAPSHOT.jar" "mapmap-server.jar"
- name: Cache JAR
id: cache-jar
uses: actions/cache@v3
with:
path: mapmap-server.jar
key: mapmap-server-jar