mirror of
https://github.com/Kir-Antipov/mc-publish.git
synced 2024-11-25 01:41:05 -05:00
README update
This commit is contained in:
parent
1d8d9fdb7c
commit
01cdf5d731
1 changed files with 359 additions and 210 deletions
569
README.md
569
README.md
|
@ -1,40 +1,46 @@
|
|||
## Publish Minecraft Mods - GitHub Action
|
||||
## mc-publish
|
||||
|
||||
[![GitHub tag](https://img.shields.io/github/tag/Kir-Antipov/mc-publish.svg?cacheSeconds=3600)](https://github.com/Kir-Antipov/mc-publish/releases/latest)
|
||||
[![GitHub build status](https://img.shields.io/github/workflow/status/Kir-Antipov/mc-publish/ci/master?cacheSeconds=3600)](https://github.com/Kir-Antipov/mc-publish/actions/workflows/ci.yml)
|
||||
[![GitHub tag](https://img.shields.io/github/tag/Kir-Antipov/mc-publish.svg)](https://github.com/Kir-Antipov/mc-publish/releases/latest)
|
||||
[![GitHub build status](https://img.shields.io/github/actions/workflow/status/Kir-Antipov/mc-publish/ci.yml?branch=master)](https://github.com/Kir-Antipov/mc-publish/actions/workflows/ci.yml)
|
||||
[![GitHub license](https://img.shields.io/github/license/Kir-Antipov/mc-publish.svg?cacheSeconds=36000)](https://github.com/Kir-Antipov/mc-publish#readme)
|
||||
|
||||
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.
|
||||
A versatile GitHub Action to streamline the publication of Minecraft projects.
|
||||
|
||||
Supports mods, plugins, resource packs, and more, across various platforms such as Modrinth, GitHub Releases, and CurseForge. Features automatic value resolution and minimal configuration requirements for effortless setup and use.
|
||||
|
||||
### 📖 Usage
|
||||
|
||||
Most of the values are automatically resolved *(read further for more info)*. Therefore, here's all you really need to publish your mod:
|
||||
Most values are resolved automatically, so to publish your project, you only need a minimal amount of configuration.
|
||||
|
||||
```yml
|
||||
```yaml
|
||||
jobs:
|
||||
build:
|
||||
# ...
|
||||
steps:
|
||||
- uses: Kir-Antipov/mc-publish@v3.2
|
||||
with:
|
||||
# You don't need this section if you don't want to publish
|
||||
# your assets to Modrinth
|
||||
# Only include this section if you wish to publish
|
||||
# your assets on 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
|
||||
# Only include this section if you wish to publish
|
||||
# your assets on 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
|
||||
# Only include this section if you wish to publish
|
||||
# your assets on GitHub.
|
||||
github-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
```
|
||||
|
||||
### 🦜 Unnecessary Verbose Example
|
||||
### 📘 Advanced Usage
|
||||
|
||||
Please, **do not** consider the following example as something you should use. `mc-publish` was made to be as zero-configy as possible, you just do not need all this. It's here to show you most of the available inputs in the form of an actual configuration. It not only hurts me on a spiritual level to see configurations with hardcoded values that could be automatically resolved, but sometimes people copy-paste inputs that will break their workflows, e.g., I saw someone trying to use `github-discussion: Announcements` in repo that had neither "Announcements" discussion category, nor discussions in general. [Occam's Razor](https://en.wikipedia.org/wiki/Occam%27s_razor) in action - if you don't see a reason to use an input, just don't use it. With all that said, let's get back to our unnecessary verbose example:
|
||||
The following verbose example is for illustrative purposes only and is not recommended for regular use. `mc-publish` was designed to require minimal configuration, so there's no need for all of these settings.
|
||||
|
||||
Overly complex configurations with hardcoded values that could be resolved automatically not only complicate your workflow but can also introduce errors. For example, attempting to use `github-discussion: Announcements` in a repository that doesn't have a "Announcements" discussion category or discussions in general would lead to problems.
|
||||
|
||||
As a rule of thumb, if you don't see a clear reason to use an input, it's best not to include it.
|
||||
|
||||
```yml
|
||||
jobs:
|
||||
|
@ -59,31 +65,34 @@ jobs:
|
|||
github-discussion: Announcements
|
||||
github-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
files-primary: build/libs/!(*-@(dev|sources|javadoc)).jar
|
||||
files-secondary: build/libs/*-@(dev|sources|javadoc).jar
|
||||
files: |
|
||||
build/libs/!(*-@(dev|sources|javadoc)).jar
|
||||
build/libs/*-@(dev|sources|javadoc).jar
|
||||
|
||||
name: Sodium 0.3.2 for Minecraft 1.17.1
|
||||
version: mc1.17.1-0.3.2
|
||||
version-type: release
|
||||
changelog-file: CHANGELOG.md
|
||||
changelog-file: CHANGELOG.*
|
||||
|
||||
loaders: |
|
||||
fabric
|
||||
forge
|
||||
quilt
|
||||
game-versions: |
|
||||
1.18.2
|
||||
[1.16,1.16.5)
|
||||
>=21w37a <1.18.2
|
||||
1.19
|
||||
21w37a
|
||||
game-version-filter: none
|
||||
dependencies: |
|
||||
required-dependency | depends | *
|
||||
optional-dependency | recommends | 0.1.0
|
||||
suggested-dependency | suggests | 0.2.0
|
||||
included-dependency | includes | 0.3.0
|
||||
conflicting-dependency | conflicts | *
|
||||
incompatible-dependency | breaks | *
|
||||
required-dependency
|
||||
optional-dependency@0.1.0(optional)
|
||||
recommended-dependency@0.2.0(recommended)
|
||||
embedded-dependency@0.3.0(embedded)
|
||||
conflicting-dependency(conflicting)
|
||||
incompatible-dependency(incompatible)
|
||||
fabric@0.81.1+1.19.4(required){modrinth:P7dR8mSH}{curseforge:306612}#(ignore:github)
|
||||
java: |
|
||||
8
|
||||
Java 1.8
|
||||
17
|
||||
|
||||
retry-attempts: 2
|
||||
|
@ -93,77 +102,74 @@ jobs:
|
|||
|
||||
### 📝 Inputs
|
||||
|
||||
| Name | Description | Default value | Examples |
|
||||
|------|-------------|---------------|----------|
|
||||
| [modrinth-id](#user-content-modrinth-id) | The ID of the Modrinth project to upload to | A value specified in the config file | `AANobbMI` |
|
||||
| [modrinth-token](#user-content-modrinth-token) | A valid token for the Modrinth API | ❌ | `${{ secrets.MODRINTH_TOKEN }}` |
|
||||
| [modrinth-featured](#user-content-modrinth-featured) | Indicates whether the version should be featured on Modrinth or not | `true` | `true` <br> `false` |
|
||||
| [modrinth-unfeature-mode](#user-content-modrinth-unfeature-mode) | Determines the way automatic unfeaturing of older Modrinth versions works | If [`modrinth-featured`](#user-content-modrinth-featured) is set to true, `subset`; otherwise, `none` | `none` <br> `subset` <br> `intersection` <br> `any` |
|
||||
| [curseforge-id](#user-content-curseforge-id) | The ID of the CurseForge project to upload to | A value specified in the config file | `394468` |
|
||||
| [curseforge-token](#user-content-curseforge-token) | A valid token for the CurseForge API | ❌ | `${{ secrets.CURSEFORGE_TOKEN }}` |
|
||||
| [github-tag](#user-content-github-tag) | The tag name of the release to upload assets to | A tag of the release that triggered the action, if any; otherwise it will be inferred from the `GITHUB_REF` environment variable | `mc1.17.1-0.3.2` |
|
||||
| [github-generate-changelog](#user-content-github-generate-changelog) | Indicates whether to automatically generate the changelog for this release. If changelog is specified, it will be pre-pended to the automatically generated notes. Unused if the GitHub Release already exists [🛈](https://docs.github.com/en/rest/releases/releases#create-a-release) | `true`, if [`changelog`](#user-content-changelog) and [`changelog-file`](#user-content-changelog-file) are not provided; otherwise, `false` | `false` <br> `true` |
|
||||
| [github-draft](#user-content-github-draft) | `true` to create a draft (unpublished) release, `false` to create a published one. Unused if the GitHub Release already exists [🛈](https://docs.github.com/en/rest/releases/releases#create-a-release) | `false` | `false` <br> `true` |
|
||||
| [github-prerelease](#user-content-github-prerelease) | `true` to identify the release as a prerelease, `false` to identify the release as a full release. Unused if the GitHub Release already exists [🛈](https://docs.github.com/en/rest/releases/releases#create-a-release) | `false`, if [`version-type`](#user-content-version-type) is `release`; otherwise, `true` | `false` <br> `true` |
|
||||
| [github-commitish](#user-content-github-commitish) | Specifies the commitish value that determines where the Git tag is created from. Can be any branch or commit SHA. Unused if the Git tag already exists [🛈](https://docs.github.com/en/rest/releases/releases#create-a-release) | The repository's default branch | `dev` <br> `feature/86` |
|
||||
| [github-discussion](#user-content-github-discussion) | If specified, a discussion of the specified category is created and linked to the release. Unused if the GitHub Release already exists [🛈](https://docs.github.com/en/rest/releases/releases#create-a-release) | ❌ | `Announcements` |
|
||||
| [github-token](#user-content-github-token) | A valid token for the GitHub API | ❌ | `${{ secrets.GITHUB_TOKEN }}` |
|
||||
| [files](#user-content-files) | A [glob](https://www.digitalocean.com/community/tools/glob) of the file(s) to upload | ❌ | `build/libs/*.jar` |
|
||||
| [files-primary](#user-content-files-primary) | A [glob](https://www.digitalocean.com/community/tools/glob) of the primary files to upload | `build/libs/!(*-@(dev\|sources\|javadoc)).jar` | `build/libs/!(*-@(dev\|sources\|javadoc)).jar` |
|
||||
| [files-secondary](#user-content-files-secondary) | A [glob](https://www.digitalocean.com/community/tools/glob) of the secondary files to upload | `build/libs/*-@(dev\|sources\|javadoc).jar` | `build/libs/*-@(dev\|sources\|javadoc).jar` |
|
||||
| [name](#user-content-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](#user-content-version) | The version number | A tag of the release that triggered the action | `mc1.17.1-0.3.2` |
|
||||
| [version-type](#user-content-version-type) | The type of the release | Will be parsed from the [`version`](#user-content-version) value | `alpha` <br> `beta` <br> `release` |
|
||||
| [changelog](#user-content-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](#user-content-changelog-file) | A glob of the changelog file | ❌ | `CHANGELOG.md` |
|
||||
| [loaders](#user-content-loaders) | A list of supported mod loaders | `fabric` for Fabric mods <br> `forge` for Forge mods <br> `quilt` for Quilt mods | `fabric` <br> `forge` <br> `quilt` <br> `rift` |
|
||||
| [game-versions](#user-content-game-versions) | A list of supported Minecraft versions | A value specified in the config file, if any; otherwise, it will be parsed from the [`version`](#user-content-version) value | `21w37a` <br> `1.17` |
|
||||
| [version-resolver](#user-content-version-resolver) | Determines the way automatic [`game-versions`](#user-content-game-versions) resolvement works | `releasesIfAny` | `exact` <br> `latest` <br> `all` <br> `releases` <br> `releasesIfAny` |
|
||||
| [dependencies](#user-content-dependencies) | A list of dependencies | A dependency list specified in the config file | `fabric \| depends \| 0.40.0` <br> `fabric-api` |
|
||||
| [java](#user-content-java) | A list of supported Java versions | *empty string* | `Java 8` <br> `Java 1.8` <br> `8` |
|
||||
| [retry-attempts](#user-content-retry-attempts) | The maximum number of attempts to publish assets | `2` | `2` <br> `10` <br> `-1` |
|
||||
| [retry-delay](#user-content-retry-delay) | Time delay between attempts to publish assets (in milliseconds) | `10000` | `10000` <br> `60000` <br> `0` |
|
||||
| [fail-mode](#user-content-fail-mode) | Determines how errors that occur during mod publishing process are handled | `fail` | `fail` <br> `warn` <br> `skip` |
|
||||
| Name | Description | Default | Examples |
|
||||
|----------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------|
|
||||
| [modrinth-id](#modrinth-id) | The unique identifier of your Modrinth project. | A value specified in the metadata file. | `AANobbMI` |
|
||||
| [modrinth-featured](#modrinth-featured) | Set to `true` to feature the version on Modrinth. | `true` | `true` <br> `false` |
|
||||
| [modrinth-unfeature-mode](#modrinth-unfeature-mode) | Sets the behavior for unfeaturing older Modrinth versions. | If `modrinth-featured` is set to `true`, `subset`; otherwise, `none`. | `none` <br> `subset` <br> `intersection` <br> `any` |
|
||||
| [modrinth-token](#modrinth-token) | Your Modrinth API token. | - | `${{ secrets.MODRINTH_TOKEN }}` |
|
||||
| [curseforge-id](#curseforge-id) | The unique identifier of your CurseForge project. | A value specified in the metadata file. | `394468` |
|
||||
| [curseforge-token](#curseforge-token) | Your CurseForge API token. | - | `${{ secrets.CURSEFORGE_TOKEN }}` |
|
||||
| [github-tag](#github-tag) | The tag name for the release where assets will be uploaded. | If a release triggered the action, its tag is used. Otherwise, inferred from `GITHUB_REF`. | `mc1.17.1-0.3.2` |
|
||||
| [github-generate-changelog](#github-generate-changelog) | Set to `true` to generate a changelog automatically for this release. Ignored if the GitHub Release already exists. | `true`, if `changelog` and `changelog-file` are not provided; otherwise, `false`. | `true` <br> `false` |
|
||||
| [github-draft](#github-draft) | Set to `true` to create a draft release. Ignored if the GitHub Release already exists. | `false` | `true` <br> `false` |
|
||||
| [github-prerelease](#github-prerelease) | Set to `true` to mark the release as a prerelease. Ignored if the GitHub Release already exists. | `false`, if `version-type` is `release`; otherwise, `true`. | `true` <br> `false` |
|
||||
| [github-commitish](#github-commitish) | Defines the commitish value that determines where the Git tag is created from. Ignored if the Git tag already exists. | The repository's default branch. | `dev` <br> `feature/86` |
|
||||
| [github-discussion](#github-discussion) | If specified, creates and links a discussion of the specified **EXISTING** category to the release. Ignored if the GitHub Release already exists. | - | `Announcements` |
|
||||
| [github-token](#github-token) | Your GitHub API token. | - | `${{ secrets.GITHUB_TOKEN }}` |
|
||||
| [files](#files) | An array of [globs](https://www.digitalocean.com/community/tools/glob) determining which files to upload. | `build/libs/!(*-@(dev\|sources\|javadoc)).jar` <br> `build/libs/*-@(dev\|sources\|javadoc).jar` | `build/libs/*.jar` |
|
||||
| [name](#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](#version) | The version number. | A tag of the release that triggered the action. | `mc1.17.1-0.3.2` |
|
||||
| [version-type](#version-type) | The version type. | Will be parsed from the `version` value. | `alpha` <br> `beta` <br> `release` |
|
||||
| [changelog](#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](#changelog-file) | A [glob](https://www.digitalocean.com/community/tools/glob) pointing to the changelog file. | - | `CHANGELOG.md` |
|
||||
| [loaders](#loaders) | An array of supported loaders. | A value specified in the metadata file. | `fabric` <br> `forge` <br> `quilt` <br> `rift` |
|
||||
| [game-versions](#game-versions) | An array of supported Minecraft versions. | A value specified in the metadata file. | `21w37a` <br> `>=1.17` <br> `[1.17,)` |
|
||||
| [dependencies](#dependencies) | An array of dependencies required by your project. | A value specified in the metadata file. | `fabric@0.40.0(required)` |
|
||||
| [game-version-filter](#game-version-filter) | Controls the method used to filter game versions. | `releases \| min-major \| min-minor` | `releases` <br> `min` <br> `max` <br> `none` |
|
||||
| [java](#java) | An array of Java versions compatible with your project. | - | `Java 8` <br> `Java 1.8` <br> `8` |
|
||||
| [retry-attempts](#retry-attempts) | Defines the maximum number of asset publishing attempts. | `2` | `2` <br> `10` <br> `-1` |
|
||||
| [retry-delay](#retry-delay) | Specifies the delay (in milliseconds) between asset publishing attempts. | `10000` | `1000` <br> `60000` <br> `0` |
|
||||
| [fail-mode](#fail-mode) | Controls how the action responds to errors during the mod publishing process. | `fail` | `fail` <br> `warn` <br> `skip` |
|
||||
|
||||
Note, that you can use any top-level property *(`name`, `version`, `dependencies`, `files`, etc.)* as a target-specific one. This can help you fine-tune `mc-publish` to suit your tastes and needs. For example, consider the following configuration:
|
||||
Please note that any top-level property *(`name`, `version`, `dependencies`, `files`, etc.)* can be used as a target-specific one. This allows you to customize `mc-publish` to better meet your individual preferences and requirements. To illustrate, let's take a look at the following configuration:
|
||||
|
||||
```yaml
|
||||
# It is a good idea to share the same primary file among different targets
|
||||
files-primary: build/libs/!(*-@(dev\|sources\|javadoc)).jar
|
||||
# Shared top-level properties
|
||||
files: build/libs/!(*-@(dev\|sources\|javadoc)).jar
|
||||
dependencies: |
|
||||
sodium@0.4.10(required){modrinth:AANobbMI}{curseforge:394468}#(ignore:curseforge)
|
||||
|
||||
modrinth-id: aaaAAAaa
|
||||
modrinth-id: AAAAAAAA
|
||||
modrinth-token: ${{ secrets.MODRINTH_TOKEN }}
|
||||
# Modrinth-specific name for your mod
|
||||
# The name of your mod, specific to Modrinth
|
||||
modrinth-name: Modrinth Mod
|
||||
# Modrinth-specific secondary files
|
||||
modrinth-files-secondary: build/libs/*-@(dev\|sources\|javadoc).jar
|
||||
# Modrinth-specific dependencies
|
||||
# It is possible to use project ids instead of slugs
|
||||
# The files for your mod, specific to Modrinth
|
||||
modrinth-files: build/libs/*.jar
|
||||
# The dependencies for your mod, specific to Modrinth
|
||||
# Note that it's possible to use project ids instead of slugs
|
||||
modrinth-dependencies: |
|
||||
AANobbMI | depends | *
|
||||
sodium
|
||||
AANobbMI@0.4.10(required)
|
||||
|
||||
curseforge-id: 0
|
||||
curseforge-token: ${{ secrets.CURSEFORGE_TOKEN }}
|
||||
# CurseForge-specific name for your mod
|
||||
# The name of your mod, specific to CurseForge
|
||||
curseforge-name: CurseForge Mod
|
||||
# CurseForge-specific secondary files
|
||||
curseforge-files-secondary: ""
|
||||
# CurseForge-specific dependencies
|
||||
# It is not possible to use project ids instead of slugs
|
||||
# The dependencies for your mod, specific to CurseForge
|
||||
# Note that it's possible to use project ids instead of slugs
|
||||
curseforge-dependencies: |
|
||||
sodium | depends | *
|
||||
394468@0.4.10(required)
|
||||
```
|
||||
|
||||
#### modrinth-id
|
||||
|
||||
The ID of the Modrinth project to upload to.
|
||||
The unique identifier of your Modrinth project.
|
||||
|
||||
```yaml
|
||||
modrinth-id: AANobbMI
|
||||
```
|
||||
|
||||
Can be automatically retrieved from the config file of your mod:
|
||||
Can be automatically retrieved from the metadata file of your project:
|
||||
|
||||
- `fabric.mod.json` (Fabric)
|
||||
|
||||
|
@ -175,19 +181,7 @@ Can be automatically retrieved from the config file of your mod:
|
|||
"mc-publish": {
|
||||
"modrinth": "AANobbMI"
|
||||
}
|
||||
},
|
||||
}
|
||||
```
|
||||
|
||||
- Custom [`modmanager`](https://github.com/DeathsGun/ModManager) field:
|
||||
```json
|
||||
{
|
||||
// ...
|
||||
"custom": {
|
||||
"modmanager": {
|
||||
"modrinth": "AANobbMI"
|
||||
}
|
||||
},
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
|
@ -195,6 +189,7 @@ Can be automatically retrieved from the config file of your mod:
|
|||
|
||||
- Custom `mc-publish` field:
|
||||
```toml
|
||||
# ...
|
||||
[mc-publish]
|
||||
modrinth="AANobbMI"
|
||||
```
|
||||
|
@ -207,13 +202,13 @@ Can be automatically retrieved from the config file of your mod:
|
|||
// ...
|
||||
"mc-publish": {
|
||||
"modrinth": "AANobbMI"
|
||||
},
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
#### modrinth-token
|
||||
|
||||
A valid token for the Modrinth API. It's required if you want to publish your assets to Modrinth.
|
||||
Your Modrinth API token. It's required if you want to publish your assets to Modrinth.
|
||||
|
||||
```yaml
|
||||
modrinth-token: ${{ secrets.MODRINTH_TOKEN }}
|
||||
|
@ -221,7 +216,7 @@ modrinth-token: ${{ secrets.MODRINTH_TOKEN }}
|
|||
|
||||
#### modrinth-featured
|
||||
|
||||
Indicates whether the version should be featured on Modrinth or not.
|
||||
Set to `true` to feature the version on Modrinth; `false` otherwise. Default value is:
|
||||
|
||||
```yaml
|
||||
modrinth-featured: true
|
||||
|
@ -229,7 +224,7 @@ modrinth-featured: true
|
|||
|
||||
#### modrinth-unfeature-mode
|
||||
|
||||
Determines the way automatic unfeaturing of older Modrinth versions works. Default value is `subset`, if [`modrinth-featured`](#user-content-modrinth-featured) is set to true; otherwise, `none`.
|
||||
Sets the behavior for unfeaturing older Modrinth versions. Default value is `subset`, if [`modrinth-featured`](#modrinth-featured) is set to `true`; otherwise, `none`.
|
||||
|
||||
```yaml
|
||||
modrinth-unfeature-mode: version-intersection | loader-subset
|
||||
|
@ -237,13 +232,16 @@ modrinth-unfeature-mode: version-intersection | loader-subset
|
|||
|
||||
Available presets:
|
||||
|
||||
- `none` - no Modrinth versions will be unfeatured
|
||||
- `subset` - only those Modrinth versions which are considered a subset of the new one *(i.e., new release suports all of the version's mod loaders **and** game versions)* will be unfeatured
|
||||
- `intersection` - only those Modrinth versions which intersects with the new one *(i.e., support at least one of the mod loaders and one of the game versions supported by the new release)* will be unfeatured
|
||||
- `any` - all Modrinth versions will be unfeatured
|
||||
- `none` - no Modrinth versions will be unfeatured.
|
||||
- `subset` - only those Modrinth versions which are considered a subset of the new one *(i.e., new release supports all of the version's mod loaders **and** game versions)* will be unfeatured.
|
||||
- `intersection` - only those Modrinth versions which intersects with the new one *(i.e., support at least one of the mod loaders and one of the game versions supported by the new release)* will be unfeatured.
|
||||
- `any` - all Modrinth versions will be unfeatured.
|
||||
|
||||
If none of the given presets suits your needs, you can construct a new one from the following values via bitwise `OR`, like so - `version-intersection | loaders-subset`:
|
||||
If none of the given presets suits your needs, you can construct a new one from the following values via bitwise `OR`, like so - `game-version-intersection | loaders-subset`:
|
||||
|
||||
- `game-version-subset`
|
||||
- `game-version-intersection`
|
||||
- `game-version-any`
|
||||
- `version-subset`
|
||||
- `version-intersection`
|
||||
- `version-any`
|
||||
|
@ -253,13 +251,13 @@ Available presets:
|
|||
|
||||
#### curseforge-id
|
||||
|
||||
The ID of the CurseForge project to upload to.
|
||||
The unique identifier of your CurseForge project.
|
||||
|
||||
```yaml
|
||||
curseforge-id: 394468
|
||||
```
|
||||
|
||||
Can be automatically retrieved from the config file of your mod:
|
||||
Can be automatically retrieved from the metadata file of your project:
|
||||
|
||||
- `fabric.mod.json` (Fabric)
|
||||
|
||||
|
@ -271,19 +269,7 @@ Can be automatically retrieved from the config file of your mod:
|
|||
"mc-publish": {
|
||||
"curseforge": 394468
|
||||
}
|
||||
},
|
||||
}
|
||||
```
|
||||
|
||||
- Custom [`modmanager`](https://github.com/DeathsGun/ModManager) field:
|
||||
```json
|
||||
{
|
||||
// ...
|
||||
"custom": {
|
||||
"modmanager": {
|
||||
"curseforge": 394468
|
||||
}
|
||||
},
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
|
@ -291,6 +277,7 @@ Can be automatically retrieved from the config file of your mod:
|
|||
|
||||
- Custom `mc-publish` field:
|
||||
```toml
|
||||
# ...
|
||||
[mc-publish]
|
||||
curseforge=394468
|
||||
```
|
||||
|
@ -303,13 +290,13 @@ Can be automatically retrieved from the config file of your mod:
|
|||
// ...
|
||||
"mc-publish": {
|
||||
"curseforge": 394468
|
||||
},
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
#### curseforge-token
|
||||
|
||||
A valid token for the CurseForge API. It's required if you want to publish your assets to CurseForge.
|
||||
Your CurseForge API token. It's required if you want to publish your assets to CurseForge.
|
||||
|
||||
```yaml
|
||||
curseforge-token: ${{ secrets.CURSEFORGE_TOKEN }}
|
||||
|
@ -317,7 +304,7 @@ curseforge-token: ${{ secrets.CURSEFORGE_TOKEN }}
|
|||
|
||||
#### github-tag
|
||||
|
||||
The tag name of the release to upload assets to. If no value is provided, a tag of the release that triggered the action will be used, if any; otherwise it will be inferred from the `GITHUB_REF` environment variable.
|
||||
The tag name for the release where assets will be uploaded. If a release triggered the action, its tag is used. Otherwise, inferred from `GITHUB_REF`.
|
||||
|
||||
```yaml
|
||||
github-tag: mc1.17.1-0.3.2
|
||||
|
@ -325,7 +312,7 @@ github-tag: mc1.17.1-0.3.2
|
|||
|
||||
#### github-generate-changelog
|
||||
|
||||
Indicates whether to automatically generate the changelog for this release. If changelog is specified, it will be pre-pended to the automatically generated notes. Unused if the GitHub Release already exists. Default value is `true`, if [`changelog`](#user-content-changelog) and [`changelog-file`](#user-content-changelog-file) are not provided; otherwise, `false`. [🛈](https://docs.github.com/en/rest/releases/releases#create-a-release)
|
||||
Set to `true` to generate a changelog automatically for this release; `false` otherwise. Ignored if the GitHub Release already exists. Default value is `true`, if `changelog` and `changelog-file` are not provided; otherwise, `false`.
|
||||
|
||||
```yaml
|
||||
github-generate-changelog: false
|
||||
|
@ -333,7 +320,7 @@ github-generate-changelog: false
|
|||
|
||||
#### github-draft
|
||||
|
||||
`true` to create a draft (unpublished) release, `false` to create a published one. Unused if the GitHub Release already exists. Default value is `false`. [🛈](https://docs.github.com/en/rest/releases/releases#create-a-release)
|
||||
Set to `true` to create a draft release; `false` otherwise. Ignored if the GitHub Release already exists. Default value is `false`.
|
||||
|
||||
```yaml
|
||||
github-draft: false
|
||||
|
@ -341,7 +328,7 @@ github-draft: false
|
|||
|
||||
#### github-prerelease
|
||||
|
||||
`true` to identify the release as a prerelease, `false` to identify the release as a full release. Unused if the GitHub Release already exists. Default value is `false`, if [`version-type`](#user-content-version-type) is `release`; otherwise, `true`. [🛈](https://docs.github.com/en/rest/releases/releases#create-a-release)
|
||||
Set to `true` to mark the release as a prerelease; `false` otherwise. Ignored if the GitHub Release already exists. Default value is `false`, if [`version-type`](version-type) is `release`; otherwise, `true`.
|
||||
|
||||
```yaml
|
||||
github-prerelease: true
|
||||
|
@ -349,7 +336,7 @@ github-prerelease: true
|
|||
|
||||
#### github-commitish
|
||||
|
||||
Specifies the commitish value that determines where the Git tag is created from. Can be any branch or commit SHA. Unused if the Git tag already exists. Default value is the repository's default branch. [🛈](https://docs.github.com/en/rest/releases/releases#create-a-release)
|
||||
Defines the commitish value that determines where the Git tag is created from. Can be any branch or commit SHA. Ignored if the Git tag already exists. Default value is the repository's default branch.
|
||||
|
||||
```yaml
|
||||
github-commitish: 347040cd637363613e56a6b333f09eaa5be3a196
|
||||
|
@ -357,7 +344,7 @@ github-commitish: 347040cd637363613e56a6b333f09eaa5be3a196
|
|||
|
||||
#### github-discussion
|
||||
|
||||
If specified, a discussion of the specified category is created and linked to the release. Unused if the GitHub Release already exists. [🛈](https://docs.github.com/en/rest/releases/releases#create-a-release)
|
||||
If specified, creates and links a discussion of the specified **EXISTING** category to the release. Ignored if the GitHub Release already exists.
|
||||
|
||||
```yaml
|
||||
github-discussion: Announcements
|
||||
|
@ -365,7 +352,7 @@ github-discussion: Announcements
|
|||
|
||||
#### github-token
|
||||
|
||||
A valid token for the GitHub API. It's required if you want to publish your assets to GitHub.
|
||||
Your GitHub API token. It's required if you want to publish your assets to GitHub.
|
||||
|
||||
```yaml
|
||||
github-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
@ -373,31 +360,17 @@ github-token: ${{ secrets.GITHUB_TOKEN }}
|
|||
|
||||
#### files
|
||||
|
||||
A glob of the file(s) to upload. If you want to publish multiple files, it's recommended to use [`files-primary`](#user-content-files-primary) and [`files-secondary`](#user-content-files-secondary) instead.
|
||||
An array of [globs](https://www.digitalocean.com/community/tools/glob) determining which files to upload. Default value is:
|
||||
|
||||
```yaml
|
||||
files: build/libs/*.jar
|
||||
```
|
||||
|
||||
#### files-primary
|
||||
|
||||
A glob of the primary files to upload. Default value is `build/libs/!(*-@(dev|sources|javadoc)).jar`.
|
||||
|
||||
```yaml
|
||||
files-primary: build/libs/!(*-@(dev|sources|javadoc)).jar
|
||||
```
|
||||
|
||||
#### files-secondary
|
||||
|
||||
A glob of the secondary files to upload. Default value is `build/libs/*-@(dev|sources|javadocs).jar`.
|
||||
|
||||
```yaml
|
||||
files-secondary: build/libs/*-@(dev|sources|javadoc).jar
|
||||
files: |
|
||||
build/libs/!(*-@(dev|sources|javadoc)).jar
|
||||
build/libs/*-@(dev|sources|javadocs).jar
|
||||
```
|
||||
|
||||
#### name
|
||||
|
||||
The name of the version. If no value is provided, a title of the release that triggered the action will be used. If you want Modrinth and CurseForge to determine the version name themselves, omit the field with an empty string (`""`).
|
||||
The name of the version. Defaults to a title of the release that triggered the action. If you want Modrinth and CurseForge to determine the version name themselves, omit the field with an empty string (`""`).
|
||||
|
||||
```yaml
|
||||
name: Sodium 0.3.2 for Minecraft 1.17.1
|
||||
|
@ -405,7 +378,7 @@ name: Sodium 0.3.2 for Minecraft 1.17.1
|
|||
|
||||
#### version
|
||||
|
||||
The version number. If no value is provided, a tag of the release that triggered the action is used.
|
||||
The version number. Defaults to a tag of the release that triggered the action.
|
||||
|
||||
```yaml
|
||||
version: mc1.17.1-0.3.2
|
||||
|
@ -413,7 +386,7 @@ version: mc1.17.1-0.3.2
|
|||
|
||||
#### version-type
|
||||
|
||||
The type of the release. If no value is provided, it will be parsed from the [`version`](#user-content-version) value (e.g., `0.40.0+1.17-alpha` results in `alpha`).
|
||||
The version type - alpha, beta, or release. By default, it will be parsed from the [`version`](#version) value. If no value is provided, it will be parsed from the [`version`](#version) value (e.g., `0.40.0+1.17-alpha` results in `alpha`).
|
||||
|
||||
```yaml
|
||||
version-type: release
|
||||
|
@ -421,7 +394,7 @@ version-type: release
|
|||
|
||||
#### changelog
|
||||
|
||||
The changelog for this version. If no value is provided, a body of the release that triggered the action will be used.
|
||||
The changelog for this version. Defaults to a body of the release that triggered the action.
|
||||
|
||||
```yaml
|
||||
changelog: This release fixes a few more issues in Sodium 0.3 for Minecraft 1.17.1.
|
||||
|
@ -429,15 +402,15 @@ changelog: This release fixes a few more issues in Sodium 0.3 for Minecraft 1.17
|
|||
|
||||
#### changelog-file
|
||||
|
||||
A glob of the changelog file.
|
||||
A [glob](https://www.digitalocean.com/community/tools/glob) pointing to the changelog file.
|
||||
|
||||
```yaml
|
||||
changelog-file: CHANGELOG.md
|
||||
changelog-file: CHANGELOG.*
|
||||
```
|
||||
|
||||
#### loaders
|
||||
|
||||
A list of supported mod loaders. If no value is provided, `fabric` will be used for valid Fabric mods, `forge` will be used for valid Forge mods, `quilt` will be used for valid Quilt mods, and `fabric, quilt` will be used for Fabric mods that were marked as Quilt-compatible.
|
||||
An array of supported mod loaders. By default, it will be automatically determined from your project's metadata file (e.g., `fabric.mod.json`, `mods.toml`, `quilt.mod.json`, etc.).
|
||||
|
||||
Fabric mods can be marked as Quilt-compatible like so:
|
||||
|
||||
|
@ -447,9 +420,9 @@ Fabric mods can be marked as Quilt-compatible like so:
|
|||
// ...
|
||||
"custom": {
|
||||
"mc-publish": {
|
||||
"quilt": true
|
||||
"loaders": ["fabric", "quilt"]
|
||||
}
|
||||
},
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
|
@ -464,59 +437,84 @@ loaders: |
|
|||
|
||||
#### game-versions
|
||||
|
||||
A list of supported Minecraft versions. If no value is provided, the minimum supported version will be retrieved from the configuration file of your mod, if any, otherwise it will be parsed from the [`version`](#user-content-version) value (e.g., `0.40.0+1.17` results in `1.17`), and then it will be expanded using the specified [`version-resolver`](#user-content-version-resolver).
|
||||
An array of supported Minecraft versions. By default, `mc-publish` will look for `minecraft` dependency in your project's metadata file (e.g., `fabric.mod.json`, `mods.toml`, `quilt.mod.json`, etc.).
|
||||
|
||||
```yaml
|
||||
game-versions: |
|
||||
1.16.5
|
||||
1.17
|
||||
1.17.1
|
||||
21w37a
|
||||
[1.16,1.16.5)
|
||||
>=21w37a <1.18.2
|
||||
1.19
|
||||
```
|
||||
|
||||
#### version-resolver
|
||||
#### game-version-filter
|
||||
|
||||
Determines the way automatic `game-versions` resolvement works. Default value is `releasesIfAny`.
|
||||
Controls the method used to filter game versions. Default value is:
|
||||
|
||||
```yaml
|
||||
version-resolver: latest
|
||||
game-version-filter: releases | min-major | min-minor
|
||||
```
|
||||
|
||||
Available values:
|
||||
Available filters (note that they can be combined to achieve the desired outcome):
|
||||
|
||||
- `exact` - exact game version *(`1.16` -> `1.16`)*
|
||||
- `latest` - the latest release of the given minor *(`1.16` -> `1.16.5`)*
|
||||
- `all` - all versions of the given minor starting with the specified build *(`1.16.5` -> `[20w45a, 20w46a, 20w48a, 20w49a, 20w51a, 1.16.5-rc1, 1.16.5]`)*
|
||||
- `releases` - all releases of the given minor starting with the specified build *(`1.16.3` -> `[1.16.3, 1.16.4, 1.16.5]`)*
|
||||
- `releasesIfAny` - all releases of the given minor starting with the specified build, if any; otherwise, all versions
|
||||
- `none` - no filter is applied.
|
||||
- `releases` - only include release versions.
|
||||
- `betas` - only include beta versions of the game.
|
||||
- `alphas` - only include alpha versions of the game.
|
||||
- `snapshots` - include both alpha and beta versions.
|
||||
- `any` - include any version types (release, beta, or alpha).
|
||||
- `min-patch` - include versions with the minimum patch number.
|
||||
- `max-patch` - include versions with the maximum patch number.
|
||||
- `min-minor` - include versions with the minimum minor number.
|
||||
- `max-minor` - include versions with the maximum minor number.
|
||||
- `min-major` - include versions with the minimum major number.
|
||||
- `max-major` - include versions with the maximum major number.
|
||||
- `min` - include the earliest versions in a range, considering major, minor, and patch values.
|
||||
- `max` - include the lates versions in a range, considering major, minor, and patch values.
|
||||
|
||||
Example of work of each individual filter for `>=1.17 <=1.18` version range:
|
||||
|
||||
- `none` - `[1.17, 1.17.1-pre1, 1.17.1-pre2, 1.17.1-pre3, 1.17.1-rc1, 1.17.1-rc2, 1.17.1, 21w37a, 21w38a, 21w39a, 21w40a, 21w41a, 21w42a, 21w43a, 21w44a, 1.18-pre1, 1.18-pre2, 1.18-pre3, 1.18-pre4, 1.18-pre5, 1.18-pre6, 1.18-pre7, 1.18-pre8, 1.18-rc1, 1.18-rc2, 1.18-rc3, 1.18-rc4, 1.18]`
|
||||
- `releases` - `[1.17, 1.17.1, 1.18]`
|
||||
- `betas` - `[1.17.1-pre1, 1.17.1-pre2, 1.17.1-pre3, 1.17.1-rc1, 1.17.1-rc2, 1.18-pre1, 1.18-pre2, 1.18-pre3, 1.18-pre4, 1.18-pre5, 1.18-pre6, 1.18-pre7, 1.18-pre8, 1.18-rc1, 1.18-rc2, 1.18-rc3, 1.18-rc4]`
|
||||
- `alphas` - `[21w37a, 21w38a, 21w39a, 21w40a, 21w41a, 21w42a, 21w43a, 21w44a]`
|
||||
- `snapshots` - `[1.17.1-pre1, 1.17.1-pre2, 1.17.1-pre3, 1.17.1-rc1, 1.17.1-rc2, 21w37a, 21w38a, 21w39a, 21w40a, 21w41a, 21w42a, 21w43a, 21w44a, 1.18-pre1, 1.18-pre2, 1.18-pre3, 1.18-pre4, 1.18-pre5, 1.18-pre6, 1.18-pre7, 1.18-pre8, 1.18-rc1, 1.18-rc2, 1.18-rc3, 1.18-rc4]`
|
||||
- `any` - `[1.17, 1.17.1-pre1, 1.17.1-pre2, 1.17.1-pre3, 1.17.1-rc1, 1.17.1-rc2, 1.17.1, 21w37a, 21w38a, 21w39a, 21w40a, 21w41a, 21w42a, 21w43a, 21w44a, 1.18-pre1, 1.18-pre2, 1.18-pre3, 1.18-pre4, 1.18-pre5, 1.18-pre6, 1.18-pre7, 1.18-pre8, 1.18-rc1, 1.18-rc2, 1.18-rc3, 1.18-rc4, 1.18]`
|
||||
- `min-patch` - `[1.17, 21w37a, 21w38a, 21w39a, 21w40a, 21w41a, 21w42a, 21w43a, 21w44a, 1.18-pre1, 1.18-pre2, 1.18-pre3, 1.18-pre4, 1.18-pre5, 1.18-pre6, 1.18-pre7, 1.18-pre8, 1.18-rc1, 1.18-rc2, 1.18-rc3, 1.18-rc4, 1.18]`
|
||||
- `max-patch` - `[1.17.1-pre1, 1.17.1-pre2, 1.17.1-pre3, 1.17.1-rc1, 1.17.1-rc2, 1.17.1]`
|
||||
- `min-minor` - `[1.17, 1.17.1-pre1, 1.17.1-pre2, 1.17.1-pre3, 1.17.1-rc1, 1.17.1-rc2, 1.17.1]`
|
||||
- `max-minor` - `[21w37a, 21w38a, 21w39a, 21w40a, 21w41a, 21w42a, 21w43a, 21w44a, 1.18-pre1, 1.18-pre2, 1.18-pre3, 1.18-pre4, 1.18-pre5, 1.18-pre6, 1.18-pre7, 1.18-pre8, 1.18-rc1, 1.18-rc2, 1.18-rc3, 1.18-rc4, 1.18]`
|
||||
- `min-major` - the same one as for `none`. I don't think we will ever see Minecraft 2.0 *(except that one April Fool's snapshot)*.
|
||||
- `max-major` - the same one as for `none`. I don't think we will ever see Minecraft 2.0 *(except that one April Fool's snapshot)*.
|
||||
- `min` - `[1.17]`
|
||||
- `max` - `[21w37a, 21w38a, 21w39a, 21w40a, 21w41a, 21w42a, 21w43a, 21w44a, 1.18-pre1, 1.18-pre2, 1.18-pre3, 1.18-pre4, 1.18-pre5, 1.18-pre6, 1.18-pre7, 1.18-pre8, 1.18-rc1, 1.18-rc2, 1.18-rc3, 1.18-rc4, 1.18]`
|
||||
|
||||
#### dependencies
|
||||
|
||||
A list of dependencies.
|
||||
An array of dependencies required by your project. By default, `mc-publish` will take them from your project's metadata file.
|
||||
|
||||
```yaml
|
||||
dependencies: |
|
||||
required-dependency | depends | *
|
||||
required-dependency | depends
|
||||
required-dependency
|
||||
optional-dependency | recommends | 0.1.0
|
||||
suggested-dependency | suggests | 0.2.0
|
||||
included-dependency | includes | 0.3.0
|
||||
conflicting-dependency | conflicts | *
|
||||
incompatible-dependency | breaks | *
|
||||
required-dependency(required)
|
||||
optional-dependency@0.1.0(optional)
|
||||
recommended-dependency@0.2.0(recommended)
|
||||
embedded-dependency@0.3.0(embedded)
|
||||
conflicting-dependency(conflicting)
|
||||
incompatible-dependency(incompatible)
|
||||
fabric@0.81.1+1.19.4(required){modrinth:P7dR8mSH}{curseforge:306612}#(ignore:github)
|
||||
```
|
||||
|
||||
As you can see, each dependency should be written on a new line using the following format - `{id} | {kind=depends} | {version=*}`.
|
||||
The format for dependencies can be described as follows: `id@version(type){platform:alias}#(ignore:ignored-platform)`. Each component of this format, with the exception of the `id`, is optional.
|
||||
|
||||
Available dependency kinds:
|
||||
- `depends` - for dependencies required to run. Without them a game will crash.
|
||||
- `recommends` - for dependencies not required to run. Without them a game will log a warning.
|
||||
- `suggests` - for dependencies not required to run. Can be used as a kind of metadata.
|
||||
- `includes` - for dependencies embedded into the mod. Can be used as a kind of metadata.
|
||||
- `conflicts` - for mods whose together with yours cause some kind of bugs, etc. With them a game will log a warning.
|
||||
- `breaks` - for mods whose together with yours might cause a game crash. With them a game will crash.
|
||||
Available dependency types:
|
||||
|
||||
Can be automatically retrieved from the config file of your mod:
|
||||
- `required` - for dependencies required to run. Without them a game will crash.
|
||||
- `recommended` - for dependencies not required to run. Without them a game will log a warning.
|
||||
- `optional` - for dependencies not required to run. Can be used as a kind of metadata.
|
||||
- `embedded` - for dependencies embedded into the mod. Can be used as a kind of metadata.
|
||||
- `conflicting` - for mods whose together with yours cause some kind of bugs, etc. With them a game will log a warning.
|
||||
- `incompatible` - for mods whose together with yours might cause a game crash. With them a game will crash.
|
||||
|
||||
Can be automatically retrieved from your project's metadata file:
|
||||
|
||||
- `fabric.mod.json` (Fabric)
|
||||
```json
|
||||
|
@ -524,23 +522,10 @@ Can be automatically retrieved from the config file of your mod:
|
|||
"required-dependency": "*"
|
||||
},
|
||||
"recommends": {
|
||||
"optional-dependency": "0.1.0"
|
||||
"recommended-dependency": "0.1.0"
|
||||
},
|
||||
"suggests": {
|
||||
"suggested-dependency": "0.2.0"
|
||||
},
|
||||
"includes": {
|
||||
// Check if your version of the Fabric loader supports objects in dependency declarations.
|
||||
"included-dependency": {
|
||||
"version": "0.3.0",
|
||||
"custom": {
|
||||
"mc-publish": {
|
||||
"ignore": false, // `mc-publish` will ignore this dependency, if `ignore` is set to true
|
||||
"modrinth": "included-dependency-fabric", // Modrinth's project slug
|
||||
"curseforge": "included-dependency-fabric" // CurseForge's project slug
|
||||
}
|
||||
}
|
||||
}
|
||||
"optional-dependency": "0.2.0"
|
||||
},
|
||||
"conflicts": {
|
||||
"conflicting-dependency": "*"
|
||||
|
@ -548,6 +533,17 @@ Can be automatically retrieved from the config file of your mod:
|
|||
"breaks": {
|
||||
"incompatible-dependency": "*"
|
||||
},
|
||||
"custom": {
|
||||
"mc-publish": {
|
||||
// This dependency declaration will be merged with everything written above.
|
||||
// It's useful if you want to provide information about dependency types not supported by Fabric.
|
||||
// Or if you want to attach platform-specific aliases to one of the dependencies above.
|
||||
"dependencies": [
|
||||
"embedded-dependency@0.3.0(embedded)#(ignore:curseforge)",
|
||||
"recommended-dependency@0.1.0(recommended){modrinth:recommended-dependency-fabric}"
|
||||
]
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
- `mods.toml` (Forge)
|
||||
|
@ -567,7 +563,7 @@ Can be automatically retrieved from the config file of your mod:
|
|||
side="BOTH"
|
||||
|
||||
[[dependencies.mod-id]]
|
||||
modId="included-dependency"
|
||||
modId="embedded-dependency"
|
||||
mandatory=false
|
||||
embedded=true
|
||||
versionRange="0.3.0"
|
||||
|
@ -575,8 +571,8 @@ Can be automatically retrieved from the config file of your mod:
|
|||
side="BOTH"
|
||||
[dependencies.mod-id.mc-publish]
|
||||
ignore=false # `mc-publish` will ignore this dependency, if `ignore` is set to true
|
||||
modrinth="included-dependency-forge" # Modrinth's project slug
|
||||
curseforge="included-dependency-forge" # CurseForge's project slug
|
||||
modrinth="embedded-dependency-forge" # Modrinth's project slug
|
||||
curseforge="embedded-dependency-forge" # CurseForge's project slug
|
||||
|
||||
[[dependencies.mod-id]]
|
||||
modId="incompatible-dependency"
|
||||
|
@ -585,10 +581,20 @@ Can be automatically retrieved from the config file of your mod:
|
|||
versionRange="*"
|
||||
ordering="NONE"
|
||||
side="BOTH"
|
||||
|
||||
[mc-publish]
|
||||
# This dependency declaration will be merged with everything written above.
|
||||
# It's useful if you want to provide information about dependency types not supported by Forge.
|
||||
# Or if you want to attach platform-specific aliases to one of the dependencies above.
|
||||
dependencies=[
|
||||
"recommended-mod@0.2.0(recommended){modrinth:recommended-dependency-forge}",
|
||||
"conflicting-mod@<0.40.0(conflicting)#(ignore:curseforge)",
|
||||
]
|
||||
```
|
||||
|
||||
- `quilt.mod.json` (Quilt)
|
||||
```json
|
||||
// ./quilt_loader
|
||||
"depends": [
|
||||
"required-dependency",
|
||||
{
|
||||
|
@ -599,12 +605,12 @@ Can be automatically retrieved from the config file of your mod:
|
|||
],
|
||||
"provides": [
|
||||
{
|
||||
"id": "included-dependency",
|
||||
"id": "embedded-dependency",
|
||||
"version": "0.3.0",
|
||||
"mc-publish": {
|
||||
"ignore": false, // `mc-publish` will ignore this dependency, if `ignore` is set to true
|
||||
"modrinth": "included-dependency-fabric", // Modrinth's project slug
|
||||
"curseforge": "included-dependency-fabric" // CurseForge's project slug
|
||||
"modrinth": "embedded-dependency-quilt", // Modrinth's project slug
|
||||
"curseforge": "embedded-dependency-quilt" // CurseForge's project slug
|
||||
}
|
||||
}
|
||||
],
|
||||
|
@ -619,22 +625,34 @@ Can be automatically retrieved from the config file of your mod:
|
|||
"unless": "some-mod-that-fixes-conflict"
|
||||
}
|
||||
],
|
||||
|
||||
// ...
|
||||
// Back to top-level ./
|
||||
"mc-publish": {
|
||||
// This dependency declaration will be merged with everything written above.
|
||||
// It's useful if you want to provide information about dependency types not supported by Quilt.
|
||||
// Or if you want to attach platform-specific aliases to one of the dependencies above.
|
||||
"dependencies": [
|
||||
"embedded-dependency@0.3.0(embedded)#(ignore:curseforge)",
|
||||
"recommended-dependency@0.1.0(recommended){modrinth:recommended-dependency-quilt}"
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
#### java
|
||||
|
||||
A list of supported Java versions. It's omitted by default.
|
||||
An array of Java versions compatible with your project.
|
||||
|
||||
```yaml
|
||||
java: |
|
||||
8
|
||||
Java 1.8
|
||||
16
|
||||
Java 17
|
||||
```
|
||||
|
||||
#### retry-attempts
|
||||
|
||||
The maximum number of attempts to publish assets.
|
||||
Defines the maximum number of asset publishing attempts. Default value is:
|
||||
|
||||
```yaml
|
||||
retry-attempts: 2
|
||||
|
@ -642,7 +660,7 @@ retry-attempts: 2
|
|||
|
||||
#### retry-delay
|
||||
|
||||
Time delay between attempts to publish assets (in milliseconds).
|
||||
Specifies the delay (in milliseconds) between asset publishing attempts. Default values is:
|
||||
|
||||
```yaml
|
||||
retry-delay: 10000
|
||||
|
@ -650,7 +668,7 @@ retry-delay: 10000
|
|||
|
||||
#### fail-mode
|
||||
|
||||
Determines how errors that occur during mod publishing process are handled. Default value is `fail`.
|
||||
Controls how the action responds to errors during the mod publishing process. Default value is:
|
||||
|
||||
```yaml
|
||||
fail-mode: fail
|
||||
|
@ -658,6 +676,137 @@ fail-mode: fail
|
|||
|
||||
Available values:
|
||||
|
||||
- `fail` - immediately sets the action status to **failed** and terminates its execution
|
||||
- `warn` - warns about errors. The action won't be terminated, nor its status will be set to **failed**
|
||||
- `skip` - warns about errors. The action won't be terminated, but its status will be set to **failed** after all specified targets have been processed
|
||||
- `fail` - immediately sets the action status to **failed** and terminates its execution.
|
||||
- `warn` - warns about errors. The action won't be terminated, nor its status will be set to **failed**.
|
||||
- `skip` - warns about errors. The action won't be terminated, but its status will be set to **failed** after all specified targets have been processed.
|
||||
|
||||
### 📤 Outputs
|
||||
|
||||
| Name | Description | Examples |
|
||||
|-------------------------------------------|--------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------|
|
||||
| [modrinth-id](#modrinth-id-1) | The unique identifier of your Modrinth project. | `"AANobbMI"` |
|
||||
| [modrinth-version](#modrinth-version) | The unique identifier of the version published on Modrinth by this action. | `"Fz37KqRh"` |
|
||||
| [modrinth-url](#modrinth-url) | The URL directing to the newly published version on Modrinth. | `"https://modrinth.com/mod/sodium/version/mc1.17.1-0.3.4"` |
|
||||
| [modrinth-files](#modrinth-files) | Array of objects, each containing details about the files published for the new version on Modrinth. | `"[]"` |
|
||||
| [curseforge-id](#curseforge-id-1) | The unique identifier of your CurseForge project. | `"394468"` |
|
||||
| [curseforge-version](#curseforge-version) | The unique identifier of the version published on CurseForge by this action. | `"3488820"` |
|
||||
| [curseforge-url](#curseforge-url) | The URL directing to the newly published version on CurseForge. | `https://www.curseforge.com/api/v1/mods/394468/files/3488820/download` |
|
||||
| [curseforge-files](#curseforge-files) | Array of objects, each containing details about the files published for the new version on CurseForge. | `"[]"` |
|
||||
| [github-repo](#github-repo) | The full repository name on GitHub, formatted as 'username/repository'. | `"CaffeineMC/sodium-fabric"` |
|
||||
| [github-tag](#github-tag-1) | The Git tag associated with the new or updated release published on GitHub. | `"mc1.17.1-0.3.4"` |
|
||||
| [github-url](#github-url) | The URL directing to the newly published version on GitHub. | `"https://github.com/CaffeineMC/sodium-fabric/releases/tag/mc1.17.1-0.3.4"` |
|
||||
| [github-files](#github-files) | Array of objects, each containing details about the files published for the new version on GitHub. | `"[]"` |
|
||||
|
||||
#### modrinth-id
|
||||
|
||||
The unique identifier of your Modrinth project.
|
||||
|
||||
```json
|
||||
"AANobbMI"
|
||||
```
|
||||
|
||||
#### modrinth-version
|
||||
|
||||
The unique identifier of the version published on Modrinth by this action.
|
||||
|
||||
```json
|
||||
"Fz37KqRh"
|
||||
```
|
||||
|
||||
#### modrinth-url
|
||||
|
||||
The URL directing to the newly published version on Modrinth.
|
||||
|
||||
```json
|
||||
"https://modrinth.com/mod/sodium/version/mc1.17.1-0.3.4"
|
||||
```
|
||||
|
||||
#### modrinth-files
|
||||
|
||||
Array of objects, each containing details about the files published for the new version on Modrinth.
|
||||
|
||||
```json5
|
||||
"[
|
||||
{
|
||||
\"name\": \"sodium-fabric-mc1.17.1-0.3.4+build.13.jar\",
|
||||
\"id\": \"85f5d67f0ce9e995e738eb6b60034bc919a1859d\",
|
||||
\"url\": \"https://cdn.modrinth.com/data/AANobbMI/versions/mc1.17.1-0.3.4/sodium-fabric-mc1.17.1-0.3.4%2Bbuild.13.jar\"
|
||||
}
|
||||
]"
|
||||
```
|
||||
|
||||
#### curseforge-id
|
||||
|
||||
The unique identifier of your CurseForge project.
|
||||
|
||||
```json
|
||||
"394468"
|
||||
```
|
||||
|
||||
#### curseforge-version
|
||||
|
||||
The unique identifier of the version published on CurseForge by this action.
|
||||
|
||||
```json
|
||||
"3488820"
|
||||
```
|
||||
|
||||
#### curseforge-url
|
||||
|
||||
The URL directing to the newly published version on CurseForge.
|
||||
|
||||
```json
|
||||
"https://www.curseforge.com/minecraft/mc-mods/sodium/files/3488820"
|
||||
```
|
||||
|
||||
#### curseforge-files
|
||||
|
||||
Array of objects, each containing details about the files published for the new version on CurseForge.
|
||||
|
||||
```json5
|
||||
"[
|
||||
{
|
||||
\"name\": \"sodium-fabric-mc1.17.1-0.3.4+build.13.jar\",
|
||||
\"id\": 394468,
|
||||
\"url\": \"https://www.curseforge.com/api/v1/mods/394468/files/3488820/download\"
|
||||
}
|
||||
]"
|
||||
```
|
||||
|
||||
#### github-repo
|
||||
|
||||
The full repository name on GitHub, formatted as 'username/repository'.
|
||||
|
||||
```json
|
||||
"CaffeineMC/sodium-fabric"
|
||||
```
|
||||
|
||||
#### github-tag
|
||||
|
||||
The Git tag associated with the new or updated release published on GitHub.
|
||||
|
||||
```json
|
||||
"mc1.17.1-0.3.4"
|
||||
```
|
||||
|
||||
#### github-url
|
||||
|
||||
The URL directing to the newly published version on GitHub.
|
||||
|
||||
```json
|
||||
"https://github.com/CaffeineMC/sodium-fabric/releases/tag/mc1.17.1-0.3.4"
|
||||
```
|
||||
|
||||
#### github-files
|
||||
|
||||
Array of objects, each containing details about the files published for the new version on GitHub.
|
||||
|
||||
```json5
|
||||
"[
|
||||
{
|
||||
\"name\": \"sodium-fabric-mc1.17.1-0.3.4+build.13.jar\",
|
||||
\"id\": 53929869,
|
||||
\"url\": \"https://github.com/CaffeineMC/sodium-fabric/releases/download/mc1.17.1-0.3.4/sodium-fabric-mc1.17.1-0.3.4%2Bbuild.13.jar\"
|
||||
}
|
||||
]"
|
||||
```
|
||||
|
|
Loading…
Reference in a new issue