release #179
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 automatically adds the mod's .jar | |
# file to any release published to GitHub. | |
name: release | |
on: | |
workflow_dispatch: | |
jobs: | |
build: | |
strategy: | |
matrix: | |
# Use these Java versions | |
java: [21] # Current Java LTS & minimum supported by Minecraft | |
os: [ubuntu-latest] | |
runs-on: ${{ matrix.os }} | |
env: | |
MAVEN_URL: ${{secrets.RELEASE_MAVEN_URL}} | |
MAVEN_USERNAME: ${{secrets.MAVEN_USERNAME}} | |
MAVEN_PASSWORD: ${{secrets.MAVEN_PASSWORD}} | |
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} | |
MODRINTH_TOKEN: ${{secrets.MODRINTH_TOKEN}} | |
steps: | |
- name: Checking Out the Repository | |
uses: actions/checkout@v4 | |
- name: Validating the Gradle Wrapper | |
uses: gradle/wrapper-validation-action@v1 | |
- name: Setting up Java ${{ matrix.java }} | |
uses: actions/setup-java@v4 | |
with: | |
distribution: 'zulu' | |
java-version: ${{ matrix.java }} | |
java-package: jdk | |
- name: Setting Up the Gradle Wrapper | |
if: ${{ runner.os != 'Windows' }} | |
run: chmod +x ./gradlew | |
- name: Caching Dependencies | |
uses: actions/cache@v3 | |
with: | |
path: | | |
~/.gradle/caches | |
~/.gradle/loom-cache | |
~/.gradle/wrapper | |
key: ${{ runner.os }}-gradle-#{{ hashFiles('**/gradle-wrapper.properties') }} | |
restore-keys: | | |
${{ runner.os }}-gradle- | |
- name: Publish to Modrinth | |
run: ./gradlew publishMod -PreleaseType=stable -PuseThirdPartyMods=false |