Giter Club home page Giter Club logo

mc-publish's People

Contributors

cadiboo avatar fxmorin avatar kir-antipov avatar lukenskyne avatar minecraftschurli avatar osfanbuff63 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

mc-publish's Issues

Use project IDs instead of slugs for dependencies

Recently, a lot of modders randomly decided to change their slugs on CF and MR (for whatever reason) which is a breaking change for all release actions using mc-publish because it's using slugs instead of the project IDs.

Would it be possible to use project IDs instead since they don't change?

Add debugging features

A dry run option that prints the parsed data and not actually uploads the files would be nice to test this out without uploading stuff

publishing order

Maybe a bit of an odd request but would it be possible to change the publishing order of the action?
I know I could make different steps by using the action multiple times but since CurseForge is down considerably more often than Modrinth, I'd like the action to try to publish to CF first so if that fails, the whole action fails and the release is canceled.

Support Quilt Loader

Modrinth supports the quilt loader, and curseforge plans to. With Quilt mods, you can check for src/main/resources/quilt.mod.json.

Wrong error message

I get an error message that says the following:
image
but i am not uploading to github:
image
Anyway i can see the actual error?

Not adding dependencies to modrinth releases

As title states when using this action, my modrinth releases are not getting there dependencies applied where as the curseforge releases have the dependencies applied fine.

As can see from the below images, my curseforge has dependencies applied fine where as modrinth does not
Curseforge
Modrinth

Publishing build question

Hello, I'm currently trying to publish on Curseforge and Mordrinth but I'm having trouble with the primary-file. It might be obvious but it's the first time I'm working with actions and I'm not sure how to to use the previously build texture pack zip from Packsquash.

I've added the link to my workflow in case you want to check it.

https://github.com/xalixilax/xali-s-Enhanced-Vanilla-16x/blob/main/.github/workflows/publish.yml
https://github.com/ComunidadAylas/PackSquash-action

Thanks for your help!

Error messages need improving

In my development of an action I was receiving and error that simply said Error: Not Found. I have managed to deduce from further development that I made on the action, that this error is related to the GitHub token being incorrect. But this took me quite a lot of time to figure out, which was very frustrating.

I would like to request that some of your error messages are looked over again and improved, for easier debugging of action issues

Modrinth unfeature release type subset

As title says, it would be nice to only unfeature versions of the same release type as we are uploading, so it can show latest beta and stable versions.

Support for Modrinth Shaders

I'm unable to push shaders to Modrinth; it seems to require a "loaders" field, which doesn't really apply - but even when it's set (as per example) it complains on push [bad request] that the value is invalid.

Bad request when trying to upload mod

I'm trying to upload a new mod through mc-publish with a workflow that I have used on another project before, but I'm getting the following error:

HttpError: 400 (Bad Request, {"error":"invalid_input","description":"Error while validating input: Field dependencies failed validation with error: duplicate dependency"})

I asked around on the Modrinth Discord but it seems like there's something wrong with the request itself. I can't really debug it however, so I'm clueless as to why it doesn't work.

My latest failed build can be found over here: https://github.com/Scubakay/litematica-enderchest-materials/actions/runs/5269300993
And my workflow file over here: https://github.com/Scubakay/litematica-enderchest-materials/blob/master/.github/workflows/gradle.yml

I don't seem to have any duplicate dependencies in my fabric.mod.json or build.gradle that I can see:

build.gradle:

dependencies {
    // To change the versions see the gradle.properties file
    minecraft "com.mojang:minecraft:${project.minecraft_version}"
    mappings "net.fabricmc:yarn:${project.yarn_mappings}:v2"
    modImplementation "net.fabricmc:fabric-loader:${project.loader_version}"

    // Fabric API. This is technically optional, but you probably want it anyway.
    modImplementation "net.fabricmc.fabric-api:fabric-api:${project.fabric_version}"

    modImplementation "curse.maven:litematica-${project.litematica_minecraft_version}-308892:${project.litematica_fileid}"
    modImplementation "curse.maven:malilib-${project.litematica_minecraft_version}-303119:${project.malilib_fileid}"
}

fabric.mod.json:

"depends": {
    "fabricloader": ">=${loader_version}",
    "fabric": "*",
    "minecraft": "${minecraft_version}",
    "fabric-api": "*"
  }

Would you maybe have any ideas as to why I'm getting this error?

Confusing error message when forgetting the secret

Ran into the error Warning: ๐Ÿ—ฟ You didn't specify any targets, your assets have not been published with the exact same setup that worked on another project. In the middle of writing a big Discussions Q/A post, I remembered that I forgot to set up the secrets for this repo. The build should just fail in case you have a modrinth-id/curseforge-id defined, but the corresponding token is empty/invalid(since it clearly was forgotten).

Add support for plugins

I posted the info already in #22 but decided to actually make this issue for better tracking.

Support to obtain values from a Spigot, BungeeCord or Velocity plugin to auto-fill values such as version and also the Modrinth/CurseForge ID would be nice to have here.

Both Spigot-based servers and BungeeCord-based proxies (including most forks of either) use a plugin.yml to obtain and use data such as the path to the main class, plugin name or version.
In the case of BungeeCord does also a bungee.yml file exist that can be used. It's basically there to allow hybrid plugins that should work on server and proxy and is prioritized by the proxy when both files are present.

Neither Spigot nor BungeeCord care if there are values in the YAML file that aren't used by them, as long as at least the required values are there, which means there is no need for a "custom" section or similar.

One note tho: Paper, a very popular fork of Spigot that adds API and Performance improvements, is currently working on a dedicated paper-plugin.yml, which, similar to a bungee.yml on a Bungee proxy, would allow defining different values for the plugin, so maybe keep that in mind for the future.
A pull request discussing this feature is here: PaperMC/Paper#8108


Another proxy that should be supported is Velocity. It has a different approach. It uses a velocity-plugin.json which is created in 2 ways:

  1. Through a @Plugin annotation that processes the provided inputs at compile to create the JSON.
    This means that support for this kind of plugin could be more difficult to achieve unless Velocity allows somehow to apply custom values through their Annotation-processing.
  2. Through manually creating the JSON file. This is the easier approach for support at the cost of the dev having to make the file themself.

For Velocity, I cannot say if it also ignores any extra keys/inputs in the JSON file or would give errors/exceptions when finding them. We have to figure this out eventually.


This is the info I'm able to provide here. I, unfortunately, do not know enough JS and TS to implement those myself.

`game-versions` cannot take anything other than specific game versions

When an action using this action, i have been trying to use a github actions step to allow me to get the version file from my gradle.properties however the game-version does not accept such variables. An example follows

name: build-release

on:
  release:
    types:
      - published

jobs:
  get-properties:
    runs-on: ubuntu-latest
    outputs:
      minecraft-version: ${{ steps.properties.outputs.minecraft_version }}
    steps:
      - name: Checkout sources
        uses: actions/checkout@v2
      - name: Read version from gradle.properties
        id: properties
        run: |
          path='./gradle.properties'
          for property in minecraft_version
          do
            result=$(sed -n "/^[[:space:]]*$property[[:space:]]*=[[:space:]]*/s/^[[:space:]]*$property[[:space:]]*=[[:space:]]*//p" "$path")
            echo "$property: $result"
            echo ::set-output name=$property::"$result"
          done
  build:
    runs-on: ubuntu-latest
    needs: [get-properties]
    steps:
      - name: Get version info
        id: getversioninfo
        run: |
          echo "::set-output name=version::${{ needs.get-properties.outputs.minecraft_version }}"
      - name: Checkout sources
        uses: actions/checkout@v2
      - name: Set up JDK 16
        uses: actions/setup-java@v2
        with:
          distribution: 'temurin'
          java-version: 16
      - name: Cache Gradle packages
        uses: actions/cache@v2
        with:
          path: |
            ~/.gradle/caches
            ~/.gradle/loom-cache
            ~/.gradle/wrapper
            ~/.m2/repository
          key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle', '**/gradle-wrapper.properties') }}
          restore-keys: ${{ runner.os }}-gradle

      - run: chmod +x gradlew

      - name: Build Release
        run: ./gradlew build --stacktrace

      - name: Upload artifacts to Modrinth, Curseforge and GitHub
        uses: Kir-Antipov/[email protected]
        with:
          modrinth-id:
          modrinth-token: ${{ secrets.MODRINTH_TOKEN }}

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

          github-token: ${{ secrets.GITHUB_TOKEN }}

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

          version-type: release

          loaders: fabric

          game-versions: ${{ steps.getversioninfo.outputs.version }}

will not be accepted even though the value it returns (in this use case) is 1.16.5, which is clearly listed as a valid string in your documentation.

I would like to request that game-versions accepts such strings, since it's a great benefit to not have to update the action between each version, since im quite prone to forgetting :)

Description sync

Would it be possible add a description-file or readme-file option?
I'd like to just update the readme in the repo and when releasing the mod, it would automagically set the description on Modrinth and/or CurseForge.
Not sure if it's possible with Curse but I do know it should be possible with Modrinth.

Error: FetchError: Cannot follow redirect with body being a readable stream (CurseForge redirects API calls to their 404 page if the project ID is invalid)

Not sure what's going wrong here, just configured the plugin like in the examples, but it's failing at uploading to CurseForge.
Don't mind the github-tag not quite working, still setting that up.

Here's the workflow .yml file.

error_mc_publish

Log

Run Kir-Antipov/[email protected]
with:
github-token: ***
modrinth-id: $MODRINTH_ID
modrinth-token: ***
curseforge-id: $CURSEFORGE_ID
curseforge-token: ***
github-tag: v+mc1.19.x
files: build/libs/!(*-@(dev|sources|all)).jar
version-type: release
modrinth-featured: false
modrinth-unfeature-mode: ${undefined}
github-generate-changelog: ${undefined}
github-draft: ${undefined}
github-prerelease: ${undefined}
github-commitish: ${undefined}
github-discussion: ${undefined}
files-primary: ${undefined}
files-secondary: ${undefined}
name: ${undefined}
version: ${undefined}
changelog: ${undefined}
changelog-file: ${undefined}
loaders: ${undefined}
game-versions: ${undefined}
dependencies: ${undefined}
version-resolver: ${undefined}
java: ${undefined}
retry-attempts: 2
retry-delay: 10000
fail-mode: ${undefined}
modrinth-files: ${undefined}
modrinth-files-primary: ${undefined}
modrinth-files-secondary: ${undefined}
modrinth-name: ${undefined}
modrinth-version: ${undefined}
modrinth-version-type: ${undefined}
modrinth-changelog: ${undefined}
modrinth-changelog-file: ${undefined}
modrinth-loaders: ${undefined}
modrinth-game-versions: ${undefined}
modrinth-dependencies: ${undefined}
modrinth-version-resolver: ${undefined}
modrinth-java: ${undefined}
modrinth-retry-attempts: ${undefined}
modrinth-retry-delay: ${undefined}
modrinth-fail-mode: ${undefined}
curseforge-files: ${undefined}
curseforge-files-primary: ${undefined}
curseforge-files-secondary: ${undefined}
curseforge-name: ${undefined}
curseforge-version: ${undefined}
curseforge-version-type: ${undefined}
curseforge-changelog: ${undefined}
curseforge-changelog-file: ${undefined}
curseforge-loaders: ${undefined}
curseforge-game-versions: ${undefined}
curseforge-dependencies: ${undefined}
curseforge-version-resolver: ${undefined}
curseforge-java: ${undefined}
curseforge-retry-attempts: ${undefined}
curseforge-retry-delay: ${undefined}
curseforge-fail-mode: ${undefined}
github-files: ${undefined}
github-files-primary: ${undefined}
github-files-secondary: ${undefined}
github-name: ${undefined}
github-version: ${undefined}
github-version-type: ${undefined}
github-changelog: ${undefined}
github-changelog-file: ${undefined}
github-loaders: ${undefined}
github-game-versions: ${undefined}
github-dependencies: ${undefined}
github-version-resolver: ${undefined}
github-java: ${undefined}
github-retry-attempts: ${undefined}
github-retry-delay: ${undefined}
github-fail-mode: ${undefined}
env:
JAVA_HOME: /opt/hostedtoolcache/Java_Temurin-Hotspot_jdk/17.0.6-10/x64
JAVA_HOME_17_X64: /opt/hostedtoolcache/Java_Temurin-Hotspot_jdk/17.0.6-10/x64
GRADLE_BUILD_ACTION_SETUP_COMPLETED: true
GRADLE_BUILD_ACTION_CACHE_RESTORED: true

๐Ÿ“ค Publishing assets to CurseForge...
Error: FetchError: Cannot follow redirect with body being a readable stream

HttpError 400 when publishing to modrinth: Field game_versions failed validation with error: length

https://github.com/mineblock11/SimpleBroadcast/actions/runs/5148324340 (>=1.20 <1.21)

However, works fine here? https://github.com/mineblock11/MRU/actions/runs/5147207350 (>=1.20 <1.21)

Run Kir-Antipov/[email protected]
  with:
    modrinth-id: ijqqUY8R
    modrinth-token: ***
    curseforge-id: 859606
    curseforge-token: ***
    github-token: ***
    modrinth-featured: ${undefined}
    modrinth-unfeature-mode: subset
    github-tag: ${undefined}
    github-generate-changelog: ${undefined}
    github-draft: ${undefined}
    github-prerelease: ${undefined}
    github-commitish: ${undefined}
    github-discussion: ${undefined}
    files: build/libs/!(*-@(dev|sources|javadoc)).jar
  build/libs/*-@(dev|sources|javadoc).jar
  
    files-primary: ${undefined}
    files-secondary: ${undefined}
    name: ${undefined}
    version: ${undefined}
    version-type: ${undefined}
    changelog: ${undefined}
    changelog-file: ${undefined}
    loaders: ${undefined}
    game-versions: ${undefined}
    dependencies: ${undefined}
    version-resolver: ${undefined}
    game-version-filter: releases | min-major | min-minor
    java: ${undefined}
    retry-attempts: [2](https://github.com/mineblock11/SimpleBroadcast/actions/runs/5148324340/jobs/9269856587#step:8:2)
    retry-delay: 10000
    fail-mode: fail
    modrinth-files: ${undefined}
    curseforge-files: ${undefined}
    github-files: ${undefined}
    modrinth-files-primary: ${undefined}
    curseforge-files-primary: ${undefined}
    github-files-primary: ${undefined}
    modrinth-files-secondary: ${undefined}
    curseforge-files-secondary: ${undefined}
    github-files-secondary: ${undefined}
    modrinth-name: ${undefined}
    curseforge-name: ${undefined}
    github-name: ${undefined}
    modrinth-version: ${undefined}
    curseforge-version: ${undefined}
    github-version: ${undefined}
    modrinth-version-type: ${undefined}
    curseforge-version-type: ${undefined}
    github-version-type: ${undefined}
    modrinth-changelog: ${undefined}
    curseforge-changelog: ${undefined}
    github-changelog: ${undefined}
    modrinth-changelog-file: ${undefined}
    curseforge-changelog-file: ${undefined}
    github-changelog-file: ${undefined}
    modrinth-loaders: ${undefined}
    curseforge-loaders: ${undefined}
    github-loaders: ${undefined}
    modrinth-game-versions: ${undefined}
    curseforge-game-versions: ${undefined}
    github-game-versions: ${undefined}
    modrinth-dependencies: ${undefined}
    curseforge-dependencies: ${undefined}
    github-dependencies: ${undefined}
    modrinth-version-resolver: ${undefined}
    curseforge-version-resolver: ${undefined}
    github-version-resolver: ${undefined}
    modrinth-game-version-filter: ${undefined}
    curseforge-game-version-filter: ${undefined}
    github-game-version-filter: ${undefined}
    modrinth-java: ${undefined}
    curseforge-java: ${undefined}
    github-java: ${undefined}
    modrinth-retry-attempts: ${undefined}
    curseforge-retry-attempts: ${undefined}
    github-retry-attempts: ${undefined}
    modrinth-retry-delay: ${undefined}
    curseforge-retry-delay: ${undefined}
    github-retry-delay: ${undefined}
    modrinth-fail-mode: ${undefined}
    curseforge-fail-mode: ${undefined}
    github-fail-mode: ${undefined}
  env:
    JAVA_HOME: /opt/hostedtoolcache/Java_Temurin-Hotspot_jdk/17.0.7-7/x64
    JAVA_HOME_17_X64: /opt/hostedtoolcache/Java_Temurin-Hotspot_jdk/17.0.7-7/x64
  
๐Ÿ“ค Uploading assets to CurseForge
โœ… Successfully published assets to CurseForge in 1[3](https://github.com/mineblock11/SimpleBroadcast/actions/runs/5148324340/jobs/9269856587#step:8:3)7[4](https://github.com/mineblock11/SimpleBroadcast/actions/runs/5148324340/jobs/9269856587#step:8:4) ms
๐Ÿ“ค Uploading assets to Modrinth
Error: HttpError: [40](https://github.com/mineblock11/SimpleBroadcast/actions/runs/5148324340/jobs/9269856587#step:8:40)0 (Bad Request, {"error":"invalid_input","description":"Error while validating input: Field game_versions failed validation with error: length"})

Allow specifying the environment of the mod (CurseForge only)

Since CurseForge has a checkbox for the environment (server/client) that is bound to the uploaded files (instead of the project, like Modrinth), every time a file is uploaded this checkbox needs to be set.
Is there any way to set this in the config that I'm missing?

Don't unfeature Modrinth versions if the new upload doesn't succeed

I run mc-publish with GitHub releases and I intentionally made a release that did not contain a valid Modrinth modpack file. However, the script still unfeatured the latest version of the modpack on Modrinth, even though the new upload failed.

I suggest doing the unfeature only if the new upload succeeds.

image

Add a way to include all minor MC versions

From what I understand do you currently have to define each MC version separately as a game-versions option when the automatic resolution isn't a usable option.

While this may not be that big of a deal for a mod, as they usually are only supporting a limited range of versions per release (i.e. 1.19, 1.19.1 and 1.19.2), is this not the same for Plugins and resource packs, which Curseforge supports and Modrinth does too now.

For a plugin is it not unusual to support any versions from 1.8 up to 1.19.2 as the Plugin API is a lot more consistent across versions compared to the more fluid modding API and as long as the plugin isn't using features introduced in a specific version is the plugin compatible with pretty much every MC version available.
Resource packs also suffer from this issue.

This can result in a game-versions list similar to this nightmare:

game-versions: |
  1.8.8
  1.9
  1.9.1
  1.9.3
  1.10
  1.11
  1.11.1
  1.12
  1.12.1
  1.12.2
  1.13
  1.13.1
  1.13.2
  1.14
  1.14.1
  1.14.2
  1.14.3
  1.14.4
  1.15
  1.15.1
  1.15.2
  1.16
  1.16.2
  1.16.3
  1.16.4
  1.16.5
  1.17
  1.17.1
  1.18
  1.18.1
  1.18.2
  1.19
  1.19.1
  1.19.2

Because of this would I like to suggest a feature, that would allow defining a major version which would include all minor ones.
The idea is to allow a pattern like 1.19.x and the action would automatically include all the known minor versions available.

This would turn the above list into this:

game-versions: |
  1.8.8
  1.9.x
  1.10
  1.11.x
  1.12.x
  1.13.x
  1.14.x
  1.15.x
  1.16.x
  1.17.x
  1.18.x
  1.19.x

As you can see would the list already be a quite shorter compared to its previous version.

If no token for Curse, Modrinth or GitHub is present, the action still tries to publish

The documentation in hte GitHub readme clearly states here that to not publish to one of the mod distribution sites, all you have to do is omit that section from your buildscript. However this is incorrect, since the action will still try to publish even if the token is not there.
An example is listed below:
image
As you can see in the image there is clearly no GitHub token being specified, yet a publishing attempt is still made.

[Request] Option to skip validation for universal jars

My Project creates a universal jar via the work of https://github.com/PacifistMC/Forgix/ though your projects gives an error in modrinth as: Error: Failed to upload file: 400 (Bad Request, {"error":"invalid_input","description":"Error while validating uploaded file: Invalid Input: No fabric.mod.json present for Fabric file."})

Not really sure why this could be occuring but here's the run link: https://github.com/Luke100000/minecraft-comes-alive/runs/7905191833?check_suite_focus=true

Cannot publish a modpack to CurseForge

Discussed in #68

Originally posted by Encode42 May 30, 2023
I'm trying to publish a mod pack to CurseForge, which does not have any files that values can be inferred from (fabric.mod.json, etc.) As such, I'm providing the game-versions field myself. This works as expected when publishing to Modrinth, however, the same is not true for CurseForge.

When the action runs, the following error appears:

Error: HttpError: 400 (Bad Request, {"errorCode":1002,"errorMessage":"Error in field `metadata`:\n* Array item count 0 is less than minimum count of 1. Path \u0027gameVersions\u0027, line 1, position 381."})

Failing run

Is this user error? Am I misunderstanding how this field works?

Fabric version detection

I just ran into a problem where mc-publish could not auto-detect supported versions of my mod from my fabric.mod.json file.

I am using an array of version ranges to specify the supported versions, which is allowed according to the specifications.

"minecraft": [
  "1.19.1",
  "1.19.2"
]

The failed Workflow and the error: Error: At least one game version should be specified

What would be the ideal setup for my project?

I have a project on Modrinth and looking at this action, I can see some good use in it.

However, the thing is that my project in question, namely AdvancedServerList, is offering 4 distinct jar files for 4 different platforms to use on.
Each platform's jar file is located in ./:platform/target/AdvancedServerList-:platform-:version.jar
:platform being the platform it was made for and :version being the version. So for example is a possible path ./bungeecord/target/AdvancedServerList-BungeeCord-1.5.1.jar

So... What would be an optimal Action setup to publish the jar files to Modrinth without any major problems?

I already have a GitHub Action to automatically add the Jar files to a new GitHub Release, so Jar files would be already available from that Action: https://github.com/Andre601/AdvancedServerList/blob/master/.github/workflows/release.yml

define CF and MR dependencies independently

Right now, I use the action for two steps in a row. One for each hosting platform because the dependencies that exist on CurseForge are either not existent on Modrinth or they have different slugs.

Would be cool if you could add modrinth-dependencies and curseforge-dependencies and that the normal dependencies option is used as common option.

Make `modrinth-featured` false by default

There isn't really a use in having modrinth-featured set to true by default.
The Modrinth site will automatically feature a version for a specific (set of) version(s).

Like, when I publish version 1.1 of my resource for MC version 1.19.2 and there is already a resource listed for that version (which isn't featured by yourself) will modrinth replace the featured resource with the new one.

This option only makes sense for people that only want one specific version to be featured while not displaying those of other MC versions and even then is the default resolving of features actually respecting different versions... or something like that.

Either way, this option doesn't quite make sense to be true by default as the normal use-case would already work fine with Modrinth's auto-feature behaviour.

CurseForge upload fails when not defining any dependencies

As discussed in Discord earlier this month, mc-publish fails to upload files to CurseForge which don't have any dependencies defined.
The error is:

Error: Failed to upload file: 400 (Bad Request, {"errorCode":1002,"errorMessage":"Error in field `metadata`:\n* Array item count 0 is less than minimum count of 1. Path 'relations.projects', line 1, position 426."})

See this action run as an example of this happening: https://github.com/ReviversMC/microDurability/actions/runs/2328272756

Depreciation warnings when using action

The following warning about depreciation is given when using this action.
Solutions are provided via the warnings links

Node.js 12 actions are deprecated. For more information see: https://github.blog/changelog/2022-09-22-github-actions-all-actions-will-begin-running-on-node16-instead-of-node12/. Please update the following actions to use Node.js 16: Kir-Antipov/mc-publish

The solution from given link

For Actions maintainers: Update your actions to run on Node 16 instead of Node 12 (Actions configuration settings)

What are glob patterns and how to use them?

Can we get a more comprehensive explanation of the file selector syntax? Or a link to one? Because I'm trying to do something like this:

"files-primary": "toomanybinds-wrapper/build/libs/((*+1.19) && !(*-@(dev|sources))).jar"

, so an inclusive condition plus an exclusive one combined, and I can't find out if it works without uploading (potentially wrong) files to CurseForge/Modrinth ๐Ÿ˜… Also, is it possible to use regex?

ResourcePack upload

Hi, I am trying to setup with this action to my workflows, but when I publish, the action fail with Error: At least one mod loader should be specified

I didn't see any option for resourcepack.

Modrinth Featured Support

So there are a couple of things to do with modrinth's featured tag for uploads that I would like.

  1. Having the action automatically remove featured from the last upload that matches the same mc versions.
  2. Being able to toggle if the upload should be featured. (and maybe toggle it based on the release type)

Multi-project builds

Not sure if there's support built-in or planned, but it would be nice to support multi-project builds such as Architectury. I assume I could abuse the secondary-files field and have both fabric and forge. This solution doesn't take into account devs who might do forge/fabric/quilt in one.

Invalid game version ID: 9008 belongs to an invalid dependency.

https://github.com/Ghost-chu/QuickShop-Hikari/actions/runs/3531473607

When mc-publish trying release artifact to CurseForge, CF returns an 400 Bad Request response:

Error Response

Error: Failed to upload file: 400 (Bad Request, {"errorCode":1009,"errorMessage":"Invalid game version ID: 9008 belongs to an invalid dependency."})

Github Actions Logs

2022-11-23T11:07:45.3941857Z ##[group]Run Kir-Antipov/[email protected]
2022-11-23T11:07:45.3942129Z with:
2022-11-23T11:07:45.3942344Z   modrinth-id: ijC5dDkD
2022-11-23T11:07:45.3942590Z   modrinth-featured: true
2022-11-23T11:07:45.3943113Z   modrinth-token: ***
2022-11-23T11:07:45.3943442Z   modrinth-dependencies: hXiIvTyT | recommends | *
nfGCP9fk | recommends | *

2022-11-23T11:07:45.3943786Z   github-discussion: Announcements
2022-11-23T11:07:45.3944156Z   github-token: ***
2022-11-23T11:07:45.3944386Z   github-draft: false
2022-11-23T11:07:45.3944618Z   curseforge-id: 709851
2022-11-23T11:07:45.3944916Z   curseforge-token: ***
2022-11-23T11:07:45.3945176Z   curseforge-name: QuickShop-Hikari
2022-11-23T11:07:45.3945633Z   curseforge-dependencies: vault | depends | *
protocollib | recommends | *
essentialsx | recommends | *
worldedit | recommends | *
nbt-api | recommends | *

2022-11-23T11:07:45.3946125Z   files-primary: quickshop-bukkit/target/QuickShop-Hikari-*.jar
2022-11-23T11:07:45.3946495Z   files-secondary: **/target/Compat-*.jar
2022-11-23T11:07:45.3946769Z   loaders: spigot
paper
purpur

2022-11-23T11:07:45.3947036Z   game-versions: 1.18.2
1.19
1.19.1
1.19.2

2022-11-23T11:07:45.3947271Z   java: 17

2022-11-23T11:07:45.3947517Z   modrinth-unfeature-mode: ${undefined}
2022-11-23T11:07:45.3947781Z   github-tag: ${undefined}
2022-11-23T11:07:45.3948052Z   github-generate-changelog: ${undefined}
2022-11-23T11:07:45.3948319Z   github-prerelease: ${undefined}
2022-11-23T11:07:45.3948583Z   github-commitish: ${undefined}
2022-11-23T11:07:45.3948823Z   files: ${undefined}
2022-11-23T11:07:45.3949039Z   name: ${undefined}
2022-11-23T11:07:45.3949259Z   version: ${undefined}
2022-11-23T11:07:45.3949495Z   version-type: ${undefined}
2022-11-23T11:07:45.3949738Z   changelog: ${undefined}
2022-11-23T11:07:45.3949977Z   changelog-file: ${undefined}
2022-11-23T11:07:45.3950224Z   dependencies: ${undefined}
2022-11-23T11:07:45.3950594Z   version-resolver: ${undefined}
2022-11-23T11:07:45.3950840Z   retry-attempts: 2
2022-11-23T11:07:45.3951065Z   retry-delay: 10000
2022-11-23T11:07:45.3951293Z   fail-mode: ${undefined}
2022-11-23T11:07:45.3951533Z   modrinth-files: ${undefined}
2022-11-23T11:07:45.3951793Z   modrinth-files-primary: ${undefined}
2022-11-23T11:07:45.3952091Z   modrinth-files-secondary: ${undefined}
2022-11-23T11:07:45.3952362Z   modrinth-name: ${undefined}
2022-11-23T11:07:45.3952615Z   modrinth-version: ${undefined}
2022-11-23T11:07:45.3952886Z   modrinth-version-type: ${undefined}
2022-11-23T11:07:45.3953160Z   modrinth-changelog: ${undefined}
2022-11-23T11:07:45.3953440Z   modrinth-changelog-file: ${undefined}
2022-11-23T11:07:45.3953714Z   modrinth-loaders: ${undefined}
2022-11-23T11:07:45.3953986Z   modrinth-game-versions: ${undefined}
2022-11-23T11:07:45.3954281Z   modrinth-version-resolver: ${undefined}
2022-11-23T11:07:45.3954551Z   modrinth-java: ${undefined}
2022-11-23T11:07:45.3954816Z   modrinth-retry-attempts: ${undefined}
2022-11-23T11:07:45.3955101Z   modrinth-retry-delay: ${undefined}
2022-11-23T11:07:45.3955376Z   modrinth-fail-mode: ${undefined}
2022-11-23T11:07:45.3955637Z   curseforge-files: ${undefined}
2022-11-23T11:07:45.3955918Z   curseforge-files-primary: ${undefined}
2022-11-23T11:07:45.3956228Z   curseforge-files-secondary: ${undefined}
2022-11-23T11:07:45.3956504Z   curseforge-version: ${undefined}
2022-11-23T11:07:45.3956790Z   curseforge-version-type: ${undefined}
2022-11-23T11:07:45.3957077Z   curseforge-changelog: ${undefined}
2022-11-23T11:07:45.3957373Z   curseforge-changelog-file: ${undefined}
2022-11-23T11:07:45.3957658Z   curseforge-loaders: ${undefined}
2022-11-23T11:07:45.3957942Z   curseforge-game-versions: ${undefined}
2022-11-23T11:07:45.3958252Z   curseforge-version-resolver: ${undefined}
2022-11-23T11:07:45.3958538Z   curseforge-java: ${undefined}
2022-11-23T11:07:45.3958818Z   curseforge-retry-attempts: ${undefined}
2022-11-23T11:07:45.3959115Z   curseforge-retry-delay: ${undefined}
2022-11-23T11:07:45.3959402Z   curseforge-fail-mode: ${undefined}
2022-11-23T11:07:45.3959778Z   github-files: ${undefined}
2022-11-23T11:07:45.3960048Z   github-files-primary: ${undefined}
2022-11-23T11:07:45.3960332Z   github-files-secondary: ${undefined}
2022-11-23T11:07:45.3960596Z   github-name: ${undefined}
2022-11-23T11:07:45.3960843Z   github-version: ${undefined}
2022-11-23T11:07:45.3961106Z   github-version-type: ${undefined}
2022-11-23T11:07:45.3961365Z   github-changelog: ${undefined}
2022-11-23T11:07:45.3961635Z   github-changelog-file: ${undefined}
2022-11-23T11:07:45.3961905Z   github-loaders: ${undefined}
2022-11-23T11:07:45.3962173Z   github-game-versions: ${undefined}
2022-11-23T11:07:45.3962452Z   github-dependencies: ${undefined}
2022-11-23T11:07:45.3962731Z   github-version-resolver: ${undefined}
2022-11-23T11:07:45.3962994Z   github-java: ${undefined}
2022-11-23T11:07:45.3963255Z   github-retry-attempts: ${undefined}
2022-11-23T11:07:45.3963532Z   github-retry-delay: ${undefined}
2022-11-23T11:07:45.3963796Z   github-fail-mode: ${undefined}
2022-11-23T11:07:45.3964026Z env:
2022-11-23T11:07:45.3964301Z   JAVA_HOME: /opt/hostedtoolcache/Java_Temurin-Hotspot_jdk/17.0.5-8/x64
2022-11-23T11:07:45.3964687Z   JAVA_HOME_17_X64: /opt/hostedtoolcache/Java_Temurin-Hotspot_jdk/17.0.5-8/x64
2022-11-23T11:07:45.3964988Z ##[endgroup]
2022-11-23T11:07:45.7063257Z ๐Ÿ“ค Publishing assets to CurseForge...
2022-11-23T11:07:46.4936346Z ##[error]Error: Failed to upload file: 400 (Bad Request, {"errorCode":1009,"errorMessage":"Invalid game version ID: 9008 belongs to an invalid dependency."})

Actions Script

# This workflow will build a Java project with Maven, and cache/restore any dependencies to improve the workflow execution time
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-java-with-maven

# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.

name: mc-publish

on:
  workflow_dispatch:
  release:
     types:
       - published
jobs:
  build:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v3
    - name: Set up JDK 17
      uses: actions/setup-java@v3
      with:
        java-version: '17'
        distribution: 'temurin'
        cache: maven
    - name: Build with Maven
      run: mvn -B package -T 16 --file pom.xml

    # Optional: Uploads the full dependency graph to GitHub to improve the quality of Dependabot alerts this repository can receive
    - name: Update dependency graph
      uses: advanced-security/maven-dependency-submission-action@571e99aab1055c2e71a1e2309b9691de18d6b7d6
    - uses: Kir-Antipov/[email protected]
      with:
        modrinth-id: ijC5dDkD
        modrinth-featured: true
        modrinth-token: ${{ secrets.MODRINTH_TOKEN }}
        modrinth-dependencies: |
          hXiIvTyT | recommends | *
          nfGCP9fk | recommends | *
  
        github-discussion: Announcements
        github-token: ${{ secrets.GITHUB_TOKEN }}
        github-draft: false
        
        curseforge-id: 709851
        curseforge-token: ${{ secrets.CURSEFORGE_TOKEN }}
        curseforge-name: QuickShop-Hikari
        curseforge-dependencies: |
          vault | depends | *
          protocollib | recommends | *
          essentialsx | recommends | *
          worldedit | recommends | *
          nbt-api | recommends | *
        
        files-primary: "quickshop-bukkit/target/QuickShop-Hikari-*.jar"
        files-secondary: "**/target/Compat-*.jar"
        loaders: |
         spigot
         paper
         purpur
        game-versions: |
          1.18.2
          1.19
          1.19.1
          1.19.2
        java: |
          17

Any solution is greatly appreciated!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.