mirror of
https://github.com/HangarMC/Hangar.git
synced 2024-12-15 06:41:46 +08:00
50 lines
1.0 KiB
YAML
50 lines
1.0 KiB
YAML
name: Build Backend
|
|
|
|
on:
|
|
# allow manual dispatch
|
|
workflow_dispatch:
|
|
# run on PRs
|
|
pull_request:
|
|
paths:
|
|
- 'backend/**'
|
|
- '.github/workflows/backend_build.yml'
|
|
|
|
concurrency:
|
|
group: ${{ github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
|
|
env:
|
|
CI: true
|
|
|
|
defaults:
|
|
run:
|
|
working-directory: backend
|
|
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
with:
|
|
submodules: true
|
|
|
|
- name: Set up JDK
|
|
uses: actions/setup-java@v4
|
|
with:
|
|
java-version: 21
|
|
distribution: temurin
|
|
cache: 'maven'
|
|
|
|
- name: Cache Maven Deps
|
|
uses: actions/cache@v4
|
|
with:
|
|
path: $GITHUB_WORKSPACE/.m2/repository
|
|
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
|
|
restore-keys: |
|
|
${{ runner.os }}-maven-
|
|
|
|
- name: Build backend
|
|
run: mvn --batch-mode --errors --fail-at-end --show-version --no-transfer-progress install
|