mirror of
https://github.com/valitydev/java-workflow.git
synced 2024-11-06 01:25:18 +00:00
56 lines
1.3 KiB
YAML
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@v3
|
|
|
|
- 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"
|
|
|