Skip to content

Publish Curseforge & Modrinth #68

Publish Curseforge & Modrinth

Publish Curseforge & Modrinth #68

Workflow file for this run

name: Publish Curseforge & Modrinth
on: [ workflow_dispatch ]
env:
JAVA_VERSION: 21
MOD_VERSION: 3.2.11
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", "1.20.1", "1.20.2", "1.20.3", "1.20.4" ]
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:
name: Forgotten Graves ${{ env.MOD_VERSION }}+${{ matrix.game_version }}
files: versions/${{ matrix.game_version }}/build/libs/!(*-@(dev|sources|javadoc)).jar
changelog-file: CHANGELOG.md
version: ${{ env.MOD_VERSION }}+${{ matrix.game_version }}
version-type: release
modrinth-id: ${{ env.MODRINTH_ID }}
modrinth-token: ${{ env.MODRINTH_TOKEN }}
curseforge-id: ${{ env.CURSEFORGE_ID }}
curseforge-token: ${{ env.CURSEFORGE_TOKEN }}