Skip to content
You're viewing an older version of this GitHub Action. Do you want to see the latest version instead?
box

GitHub Action

mc-publish

v1.0.0

mc-publish

box

mc-publish

Your one-stop GitHub Action for seamless Minecraft project publication across various platforms

Installation

Copy and paste the following snippet into your .yml file.

              

- name: mc-publish

uses: Kir-Antipov/[email protected]

Learn more about this action in Kir-Antipov/mc-publish

Choose a version

Publish Minecraft Mods - GitHub Action

GitHub tag GitHub build status GitHub license

The Publish Minecraft Mods action helps you upload assets of your Minecraft mods to GitHub Releases, Modrinth and CurseForge. This is a cross-platform action that runs on any environment.

Usage

jobs:
  build:
    # ...
    steps:
      - uses: Kir-Antipov/[email protected]
        with:
          modrinth-id: AANobbMI
          modrinth-token: ${{ secrets.MODRINTH_TOKEN }}

          curseforge-id: 394468
          curseforge-token: ${{ secrets.CURSEFORGE_TOKEN }}

          github-tag: mc1.17.1-0.3.2
          github-token: ${{ secrets.GITHUB_TOKEN }}

          files-primary: build/libs/!(*-@(dev|sources)).jar
          files-secondary: build/libs/*-@(dev|sources).jar

          name: Sodium 0.3.2 for Minecraft 1.17.1
          version: mc1.17.1-0.3.2
          versionType: release
          changelog-file: CHANGELOG.md

          loaders: |
            fabric
            forge
          gameVersions: |
            1.16.3
            1.17
            1.17.1
            21w37a
          java: |
            8
            16

Inputs

Name Description Default value Examples
modrinth-id The ID of the Modrinth project to upload to AANobbMI
modrinth-token A valid token for the Modrinth API ${{ secrets.MODRINTH_TOKEN }}
curseforge-id The ID of the CurseForge project to upload to 394468
curseforge-token A valid token for the CurseForge API ${{ secrets.CURSEFORGE_TOKEN }}
github-tag The tag name of the release to upload assets to A tag of the release that triggered the action mc1.17.1-0.3.2
github-token A valid token for the CurseForge API ${{ secrets.GITHUB_TOKEN }}
files A glob of the files to upload build/libs/*.jar
files-primary A glob of the primary files to upload build/libs/!(*-@(dev|sources)).jar build/libs/!(*-@(dev|sources)).jar
files-secondary A glob of the secondary files to upload build/libs/*-@(dev|sources).jar build/libs/*-@(dev|sources).jar
name The name of the version A title of the release that triggered the action Sodium 0.3.2 for Minecraft 1.17.1
version The version number A tag of the release that triggered the action mc1.17.1-0.3.2
version-type The type of the release Will be parsed from the version value (e.g., 0.40.0+1.17-alpha results in alpha) alpha
beta
release
changelog The changelog for this version A body of the release that triggered the action This release fixes a few more issues in Sodium 0.3 for Minecraft 1.17.1.
changelog-file A glob of the changelog file CHANGELOG.md
loaders A list of supported mod loaders fabric fabric
forge
rift
game-versions A list of supported Minecraft versions Will be parsed from the version value (e.g., 0.40.0+1.18_experimental results in 21w37a and 21w38a at the moment) 21w37a
1.17
java A list of supported Java versions empty string Java 8
Java 1.8
8

Minimalistic Example

As you can see, most of the values are automatically resolved. Therefore, here's all you really need to publish your Fabric mod:

jobs:
  build:
    # ...
    steps:
      - uses: Kir-Antipov/[email protected]
        with:
          # You don't need this section if you don't want to publish
          # your assets to Modrinth
          modrinth-id: AANobbMI
          modrinth-token: ${{ secrets.MODRINTH_TOKEN }}

          # You don't need this section if you don't want to publish
          # your assets to CurseForge
          curseforge-id: 394468
          curseforge-token: ${{ secrets.CURSEFORGE_TOKEN }}

          # You don't need this section if you don't want to publish
          # your assets to GitHub
          github-token: ${{ secrets.GITHUB_TOKEN }}