Skip to content

HSGamer/MCReleaser

Repository files navigation

MCReleaser

A program to publish artifacts to multiple platforms of voxel games

Usage

CLI

java 
    -Dname="Artifact Name"
    -Dversion="Artifact Version"
    -Ddescription="Artifact Description"
    -DgameVersions="Game Versions"
    -jar mcreleaser.jar

Use -D to set environment variables as properties in camel case, e.g., GITHUB_TOKEN becomes -DgithubToken

Docker

docker run
    -e NAME="Artifact Name"
    -e VERSION="Artifact Version"
    -e DESCRIPTION="Artifact Description"
    -e GAME_VERSIONS="Game Versions"
    ghcr.io/hsgamer/mcreleaser:master

Github Actions

- name: Release
  uses: HSGamer/MCReleaser@master
  with:
    files: |
      build/libs/MyPlugin-*.jar
      *.jar
    platforms: all
  env:
    GITHUB_TOKEN: ${{ github.token }}

    MODRINTH_TOKEN: ${{ secrets.MODRINTH_TOKEN }}
    MODRINTH_PROJECT: AABBCC
    MODRINTH_LOADERS: folia

    HANGAR_KEY: ${{ secrets.HANGAR_KEY }}
    HANGAR_PROJECT: AABBCC
    HANGAR_PLATFORM: paper

Check Environment Variables for available variables to put in env

Inputs

  • files

    • Required: true
    • A file or wildcard pattern to upload
    • It's splited into primary and secondary files
    • If a single line is provided, the first file will be the primary one, others will be secondary
    • If multiple line is provided, the first line is for primary files, others are for secondary files
  • platforms

    • Required: false
    • Default: all
    • The platforms where the artifacts will be uploaded to

Environment Variables

Common

Name Description Required Default
NAME The name of the artifact Yes
VERSION The version of the artifact Yes
DESCRIPTION The description of the artifact Yes
ANNOUNCE_MISSING_KEY Whether to announce the missing variables No false
GAME_VERSIONS The game versions that the artifact supports No
GAME_VERSION_TYPE The type of the game version to filter No
Name Description Required Default
GITHUB_TOKEN The Github token to publish the artifact Yes
GITHUB_REPOSITORY The Github repository to publish the artifact Yes
GITHUB_REF The Github ref to publish the artifact Yes
GITHUB_DRAFT Whether to publish the artifact as a draft No false
GITHUB_PRERELEASE Whether to publish the artifact as a prerelease No false
Name Description Required Default
HANGAR_KEY The Hangar API key to publish the artifact Yes
HANGAR_PROJECT The Hangar project to publish the artifact Yes
HANGAR_CHANNEL The Hangar channel to publish the artifact Yes
HANGAR_GAME_VERSIONS The game versions that the artifact supports
Will use GAME_VERSIONS if set
Yes
HANGAR_PLATFORM The Hangar platform to publish the artifact No Release
HANGAR_DEPENDENCIES The dependencies of the artifact No
Name Description Required Default
MODRINTH_TOKEN The Modrinth token to publish the artifact Yes
MODRINTH_PROJECT The Modrinth project to publish the artifact Yes
MODRINTH_GAME_VERSIONS The game versions that the artifact supports
Will use GAME_VERSIONS if set
Yes
MODRINTH_GAME_VERSION_TYPE The type of the game version to filter
Will use GAME_VERSION_TYPE if set
No Release
MODRINTH_LOADERS The loaders that the artifact supports Yes
MODRINTH_VERSION_TYPE The Modrinth version type to publish the artifact No Release
MODRINTH_DEPENDENCIES The dependencies of the artifact No
Name Description Required Default
POLYMART_KEY The Polymart API key to publish the artifact Yes
POLYMART_RESOURCE The Polymart resource to publish the artifact Yes
POLYMART_TAG The tag of the artifact. release, beta, snapshot No release
Name Description Required Default
CURSEFORGE_TOKEN The CurseForge API token to publish the artifact Yes
CURSEFORGE_PROJECT The CurseForge project to publish the artifact Yes
CURSEFORGE_TYPE The type of the artifact. minecraft or hytale No minecraft
CURSEFORGE_RELEASE_TYPE The release type of the artifact. release, alpha or beta No release
CURSEFORGE_GAME_VERSIONS The game versions that the artifact supports
Will use GAME_VERSIONS if set
No
CURSEFORGE_RELATIONS The relations of the artifact No
CURSEFORGE_MOD_LOADERS The mod loaders that the artifact supports No
CURSEFORGE_JAVA_VERSION The Java version required for the artifact No
CURSEFORGE_ENVIRONMENT The environment of the artifact No
CURSEFORGE_MANUAL Whether to manually create the release No

About

A program to publish artifacts to multiple platforms of voxel games

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Sponsor this project

  •  

Packages

 
 
 

Contributors