Skip to content

Publish Curseforge & Modrinth #63

Publish Curseforge & Modrinth

Publish Curseforge & Modrinth #63

Workflow file for this run

name: Stonecutter - Publish Curseforge & Modrinth
on: [ workflow_dispatch ]
env:
JAVA_VERSION: 21
MOD_VERSION: 3.2.8
MODRINTH_TOKEN: ${{ secrets.PUBLISH_MODRINTH_TOKEN }}
MODRINTH_ID: FrZIkosK
CURSEFORGE_TOKEN: ${{ secrets.PUBLISH_CURSEFORGE_TOKEN }}
CURSEFORGE_ID: 550480
jobs:
build:
runs-on: "ubuntu-latest"
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Setup Java
uses: actions/setup-java@v4
with:
distribution: corretto
cache: gradle
java-version: ${{ env.JAVA_VERSION }}
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v3
with:
gradle-version: "wrapper"
- name: Build JARs
uses: Wandalen/wretry.action@master
with:
command: "gradle chiseledBuild"
attempt_limit: 3
- name: Upload Built JARs
uses: actions/upload-artifact@v4
with:
name: built-jars
path: ./versions/**/build/libs/*.jar
distribute:
needs: build
runs-on: "ubuntu-latest"
strategy:
matrix:
game_version: [ "1.20.3" ]
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Download Built JARs
uses: actions/download-artifact@v4
with:
name: built-jars
path: ./versions
- name: Publish to Modrinth, CurseForge, etc.
uses: Kir-Antipov/[email protected]
with:
files: versions/${{ matrix.game_version }}/build/libs/!(*-@(dev|sources|javadoc)).jar
version: ${{ env.MOD_VERSION }}+${{ matrix.game_version }}
modrinth-id: ${{ env.MODRINTH_ID }}
modrinth-token: ${{ env.MODRINTH_TOKEN }}
curseforge-id: ${{ env.CURSEFORGE_ID }}
curseforge-token: ${{ env.CURSEFORGE_TOKEN }}