55 lines
1.4 KiB
YAML
55 lines
1.4 KiB
YAML
name: Build Delta
|
|
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
pull_request:
|
|
workflow_dispatch:
|
|
|
|
env:
|
|
JAVA_VERSION: "21"
|
|
|
|
jobs:
|
|
build:
|
|
name: Build paperclip jar
|
|
runs-on: ubuntu-latest
|
|
container:
|
|
image: docker.io/library/eclipse-temurin:21-jdk
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
with:
|
|
fetch-depth: 0
|
|
submodules: false
|
|
|
|
- name: Setup gradle cache
|
|
uses: actions/cache@v4
|
|
with:
|
|
path: |
|
|
~/.gradle/caches
|
|
.gradle
|
|
key: delta-gradle-${{ github.ref_name }}-${{ github.sha }}
|
|
restore-keys: |
|
|
delta-gradle-${{ github.ref_name }}-
|
|
|
|
# applyPatches and createMojmapPaperclipJar MUST be separate invocations:
|
|
# combined they fail with an implicit-dependency error on
|
|
# applyResourcePatches -> processResources.
|
|
- name: Apply patches
|
|
run: ./gradlew applyPatches --stacktrace
|
|
|
|
- name: Build paperclip jar
|
|
run: ./gradlew createMojmapPaperclipJar --stacktrace
|
|
|
|
- name: List artifacts
|
|
run: ls -la paper-server/build/libs/
|
|
|
|
- name: Upload jar
|
|
uses: actions/upload-artifact@v3
|
|
with:
|
|
name: delta-paperclip
|
|
path: |
|
|
paper-server/build/libs/paper-paperclip-*.jar
|
|
paper-server/build/libs/paper-server-*.jar
|
|
retention-days: 14
|
|
if-no-files-found: error |