Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 34 additions & 12 deletions .github/workflows/maven.yml
Original file line number Diff line number Diff line change
@@ -1,24 +1,46 @@
name: Java CI
name: Build (Maven)

on:
push:
branches:
- master
- master
- main
pull_request:
branches:
- master
- master
- main
workflow_dispatch:

jobs:
build:

runs-on: ubuntu-latest

permissions:
contents: read

steps:
- uses: actions/checkout@v2
- name: Set up JDK 16
uses: actions/setup-java@v2
with:
distribution: 'zulu'
java-version: 16
- name: Build with Maven
run: mvn package --file pom.xml
- name: Checkout repository
uses: actions/checkout@v4

- name: Set up JDK 17
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: '17'
cache: maven

- name: Verify Maven wrapper (if present)
run: |
if [ -f ./mvnw ]; then
chmod +x mvnw
fi

- name: Build with Maven
run: mvn -B clean package

- name: Upload build artifact
uses: actions/upload-artifact@v4
with:
name: FoxyMachines-build
path: target/*.jar
if-no-files-found: error