-
Notifications
You must be signed in to change notification settings - Fork 28
33 lines (31 loc) · 979 Bytes
/
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
name: Build & Test
on: [push, pull_request, workflow_dispatch]
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Prepare cache key
id: cache-key
shell: bash
run: echo "::set-output name=date::$(/bin/date -u "+%Y-%m")"
- name: Cache Maven dependencies
uses: actions/cache@v4
with:
path: ~/.m2/repository
# The cache key is changed every month to prevent unlimited growth.
key: maven-cache-${{ steps.cache-key.outputs.date }}
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: 17
distribution: adopt
- name: Build with Maven
run: ./mvnw clean verify --no-transfer-progress
- uses: actions/upload-artifact@v4
name: Upload openapi.json
with:
name: openapi.json
path: target/openapi.json