Skip to content

Create main.yml

Create main.yml #1

Workflow file for this run

name: Build
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up JDK 21
uses: actions/setup-java@v4
with:
java-version: 21
distribution: temurin
- name: Compile with maven
run: mvn validate test-compile
- name: Test with maven
run: mvn surefire:test
- name: Package to jar
run: mvn jar:jar
- run: mkdir staging && cp target/*.jar staging
- name: Upload package
uses: actions/upload-artifact@v4
with:
name: Package
path: staging