Fix shadow relocation #253
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: build | |
on: | |
push: | |
branches: [ "main", "develop", "version/*" ] | |
pull_request: | |
branches: [ "main", "develop", "version/*" ] | |
workflow_dispatch: | |
inputs: | |
publish: | |
description: Publish to Modrinth and CurseForge | |
required: true | |
default: "false" | |
permissions: | |
contents: write | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Setup JDK 21 | |
uses: actions/setup-java@v4 | |
with: | |
java-version: 21 | |
distribution: 'temurin' | |
- name: Setup Gradle | |
uses: gradle/actions/setup-gradle@v3 | |
- name: Build with Gradle | |
if: ${{ !github.event.inputs.publish }} | |
run: ./gradlew build | |
- name: Publish with Gradle | |
if: ${{ github.event.inputs.publish }} | |
env: | |
MODRINTH_TOKEN: ${{secrets.MODRINTH_TOKEN}} | |
CURSEFORGE_TOKEN: ${{secrets.CURSE_TOKEN}} | |
MODRINTH_ID: ${{vars.MODRINTH_ID}} | |
CURSEFORGE_ID: ${{vars.CURSE_ID}} | |
run: ./gradlew build publishMods |