java-workflow/.github/workflows/maven-swag-build.yml
2024-07-18 08:41:54 +00:00

56 lines
1.3 KiB
YAML

name: Maven Build Artifact
on:
workflow_call:
inputs:
node-version:
description: 'Node version'
required: false
default: "16"
type: string
java-version:
description: 'Java version'
required: false
default: "17"
type: string
java-distribution:
description: 'Java distribution'
required: false
default: "temurin"
type: string
jobs:
bundle:
runs-on: ubuntu-20.04
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup Maven
uses: actions/setup-java@v3
with:
java-version: ${{ inputs.java-version }}
distribution: ${{ inputs.java-distribution }}
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: ${{ inputs.node-version }}
cache: npm
- name: NPM install
run: npm install
- name: Bundle specification
run: npm run build
- name: Validate specification
run: npm run validate
- name: Build server jar
run: mvn --batch-mode clean package -f pom.xml -P="server"
- name: Build client jar
run: mvn --batch-mode clean package -f pom.xml -P="client"