Avoid Bucket NPE #1658
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
# 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.20.1 | |
VERSION: 1.20.1-snapshot | |
MODRINTH_TOKEN: ${{ secrets.PUBLISH_MODRINTH_TOKEN }} | |
RELEASE_NAME: banner-1.20.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: '17' | |
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 |