forked from Upstream/CitizensCMD
33 lines
839 B
YAML
33 lines
839 B
YAML
name: Build
|
|
|
|
on:
|
|
push:
|
|
branches: [master]
|
|
pull_request:
|
|
branches: [master]
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
if: startsWith(github.event.head_commit.message, '[CI-BUILD]')
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- name: Set up JDK 21 (Java 21)
|
|
uses: actions/setup-java@v4
|
|
with:
|
|
java-version: 21
|
|
distribution: 'temurin'
|
|
- name: Cache local Maven repository
|
|
uses: actions/cache@v4
|
|
with:
|
|
path: ~/.m2/repository
|
|
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
|
|
restore-keys: ${{ runner.os }}-maven-
|
|
- name: Build with Maven
|
|
run: mvn -B package --file pom.xml
|
|
- name: Upload artifacts (Jars)
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: ${{ github.event.repository.name }}
|
|
path: target/*.jar
|