Revert "ServiceLoader is cool" #24
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Java CI | |
on: | |
push: | |
branches: | |
- "1.16-rhizo" | |
workflow_dispatch: | |
inputs: | |
norelease: | |
description: 'will not publish if true' | |
required: true | |
default: 'false' | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
if: | | |
!contains(github.event.head_commit.message, '[ciskip]') | |
steps: | |
- uses: actions/cache@v4 | |
with: | |
path: | | |
~/.gradle/caches | |
~/.gradle/wrapper | |
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }} | |
restore-keys: | | |
${{ runner.os }}-gradle- | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 30 # Gets the last 30 commits so the changelog might work | |
# Always run on Java 17 or higher, Loom needs it | |
- name: Set up JDK 17 | |
uses: actions/setup-java@v4 | |
with: | |
distribution: 'adopt' | |
java-version: '17' | |
- name: Build with Gradle | |
env: | |
FTB_MAVEN_TOKEN: ${{ secrets.FTB_MAVEN_TOKEN }} | |
SAPS_TOKEN: ${{ secrets.SAPS_TOKEN }} | |
run: | | |
chmod +x ./gradlew | |
./gradlew build publish --stacktrace --no-daemon | |
- name: Upload Build Artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
path: | | |
forge/build/libs | |
fabric/build/libs | |
- name: Release to CurseForge | |
if: | | |
contains(github.ref, 'main') && !contains(github.event.head_commit.message, '[norelease]') && github.event.inputs.norelease != 'true' | |
env: | |
GIT_COMMIT: ${{ github.event.after }} | |
GIT_PREVIOUS_COMMIT: ${{ github.event.before }} | |
CURSEFORGE_KEY: ${{ secrets.CURSEFORGE_KEY }} | |
run: | | |
chmod +x ./gradlew | |
./gradlew build curseforge --stacktrace --no-daemon |