Skip to content

Add complete Folia support #28

Add complete Folia support

Add complete Folia support #28

Workflow file for this run

name: Build
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- uses: actions/checkout@v4
- name: Set up JDK 21 and 25
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: |
21
25
cache: maven
- name: Initialize Paper NMS
run: |
for file in $(grep -l '<artifactId>paper-nms</artifactId>' $(find . -name 'pom.xml')); do
mvn -B paper-nms:init --file "$file"
done
- name: Build
run: mvn -B install --file pom.xml -DskipTests
- name: Upload SignGUI jar
uses: actions/upload-artifact@v4
with:
name: signgui-build
path: api/target/signgui-*.jar
if-no-files-found: error
- name: Publish snapshot to Reposilite
if: github.event_name == 'push'
run: |
VERSION=$(mvn -q -DforceStdout help:evaluate -Dexpression=project.version --file pom.xml)
echo "Project version: $VERSION"
if [[ "$VERSION" != *-SNAPSHOT ]]; then
echo "Not a SNAPSHOT version — skipping snapshot publish."
exit 0
fi
if [ -z "${REPOSILITE_USER}" ] || [ -z "${REPOSILITE_TOKEN}" ]; then
echo "Missing REPOSILITE_USER / REPOSILITE_TOKEN secrets."
exit 1
fi
mvn -B deploy --file pom.xml -pl api -am -DskipTests \
--settings .github/maven-settings.xml
env:
REPOSILITE_USER: ${{ secrets.REPOSILITE_USER }}
REPOSILITE_TOKEN: ${{ secrets.REPOSILITE_TOKEN }}