Publish to CurseForge & Modrinth #4
Workflow file for this run
This file contains hidden or 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: Publish to CurseForge & Modrinth | |
| on: | |
| release: | |
| types: [published] | |
| workflow_dispatch: | |
| jobs: | |
| publish: | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - name: Checkout Master Repository | |
| uses: actions/checkout@v4 | |
| with: | |
| ref: master | |
| - name: Get Mod Info | |
| id: mod_info | |
| run: | | |
| VERSION=$(grep "mod_version" gradle.properties | cut -d'=' -f2) | |
| MC_VERSION=$(grep "minecraft_version" gradle.properties | cut -d'=' -f2) | |
| echo "version=$VERSION" >> $GITHUB_OUTPUT | |
| echo "mc_version=$MC_VERSION" >> $GITHUB_OUTPUT | |
| - name: Download Artifacts from Build branch | |
| uses: actions/checkout@v4 | |
| with: | |
| ref: build | |
| path: build-artifacts | |
| - name: Publish to CurseForge + Modrinth | |
| uses: tristankechlo/publish-mc-mod@v2.0.0 | |
| with: | |
| mc-version: ${{ steps.mod_info.outputs.mc_version }} | |
| mod-version: ${{ steps.mod_info.outputs.version }} | |
| curseforge-id: ${{ secrets.CURSEFORGE_PROJECT_ID }} | |
| modrinth-id: ${{ secrets.MODRINTH_PROJECT_ID }} | |
| version-range: ${{ steps.mod_info.outputs.mc_version }} | |
| version-type: "release" | |
| loaders: "fabric" | |
| fabric-glob: "build-artifacts/stackabletools-${{ steps.mod_info.outputs.version }}.jar" | |
| changelog: "Official release of v${{ steps.mod_info.outputs.version }}" | |
| curseforge-token: ${{ secrets.CURSEFORGE_API_KEY }} | |
| modrinth-token: ${{ secrets.MODRINTH_API_TOKEN }} |