java-workflow/.github/workflows/maven-swag-build.yml
2023-05-05 12:59:08 +03:00

68 lines
1.6 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"
dependency-check:
runs-on: ubuntu-latest
steps:
- name: 'Checkout Repository'
uses: actions/checkout@v3
- name: Dependency Review
uses: actions/dependency-review-action@v3
with:
fail-on-severity: critical
vulnerability-check: true
comment-summary-in-pr: true