Skip to content

Fixed #312

Fixed #312 #1657

Workflow file for this run

# This workflow will build a Java project with Gradle
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-gradle
name: Build And Publish to Modrinth
on : [push, pull_request]
env:
MINECRAFT_VERSION: 1.21.1
VERSION: 1.21.1-snapshot
MODRINTH_TOKEN: ${{ secrets.PUBLISH_MODRINTH_TOKEN }}
RELEASE_NAME: banner-1.21.1
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Cache
uses: actions/cache@v2
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
restore-keys: |
${{ runner.os }}-gradle-
- uses: actions/checkout@v4
- name: Set up JDK 21
uses: actions/setup-java@v3
with:
java-version: '21'
distribution: 'adopt'
- name: Set version env
run: echo "RELEASE_VERSION=${GITHUB_REF:10}" >> $GITHUB_ENV
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Build with Gradle
run: ./gradlew cleaBuild build
- name: Upload API Lib
uses: actions/upload-artifact@v4
with:
name: Banner API
path: ./banner-api/build/devlibs/*.jar