Skip to content

Publish on CurseForge & Modrinth #36

Publish on CurseForge & Modrinth

Publish on CurseForge & Modrinth #36

Workflow file for this run

name: Publish on CurseForge & Modrinth
on: [ workflow_dispatch ]
env:
JAVA_VERSION: 21
MC_VERSION: 1.21.1
RELEASE_NAME: Kingdom Keys
MODRINTH_TOKEN: ${{ secrets.PUBLISH_MODRINTH_TOKEN }}
CURSEFORGE_TOKEN: ${{ secrets.PUBLISH_CURSEFORGE_TOKEN }}
permissions:
contents: write
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Check Environment Variables
run: env
- name: Checkout Repository
uses: actions/checkout@v4
with:
submodules: true
- name: Setup Java
uses: actions/setup-java@v2
with:
distribution: "temurin"
java-version: "${{env.JAVA_VERSION}}"
- name: Make Gradle Wrapper Executable
if: ${{ runner.os != 'Windows' }}
run: chmod +x ./gradlew
- name: Build
run: ./gradlew clean build --stacktrace
- name: Get version number
uses: BrycensRanch/[email protected]
id: mod_version
with:
file: gradle.properties
property: mod_version
- name: Publish (CurseForge/Modrinth)
uses: Kir-Antipov/[email protected]
with:
curseforge-id: 242862
curseforge-token: "${{env.CURSEFORGE_TOKEN}}"
modrinth-id: DrsqKwVw
modrinth-token: "${{env.MODRINTH_TOKEN}}"
name: "${{env.RELEASE_NAME}} ${{steps.mod_version.outputs.mod_version}}"
version: "${{steps.mod_version.outputs.mod_version}}-${{env.MC_VERSION}}"
version-type: release
changelog-file: CHANGELOG.md
loaders: neoforge
game-versions: "${{env.MC_VERSION}}"
java: "${{env.JAVA_VERSION}}"