itsmeow / curseforge-upload Goto Github PK
View Code? Open in Web Editor NEWAn action for interacting with the CurseForge file upload API
License: MIT License
An action for interacting with the CurseForge file upload API
License: MIT License
I'm not sure which request is failing, as the logging isn't detailed enough.
The response body would likely say exactly why the request failed, but isn't printed.
https://github.com/oddstr13/MinecartMeter/runs/4655726066?check_suite_focus=true#step:10:18
Any idea what's going on here?
https://github.com/florensie/eggtab-fabric/runs/1644437249?check_suite_focus=true#step:9:22
I use this to publish my modpack automatically.
I release zip for for servers too. I need to upload that zip file as an "additional file". Is there a way to do that?
Is this curseforge api being bad, or is there some bug with version name -> id mapping? (or did we do something incorrectly?)
The workflow passed 1.18.2
to the action, seems like it was translated to that id then curseforge rejected it.
{"errorCode":1009,"errorMessage":"Invalid game version ID: 9016 belongs to an invalid dependency."}
This is the run that triggered it with all the inputs: https://github.com/gnembon/fabric-carpet/runs/5683187727?check_suite_focus=true (in the little arrow at line 1)
Allow specifying a numeric gameVersionTypeId
instead of performing a lookup via the version-types
endpoint.
Ex: Java:Java 18
-> 2:Java 18
Due to how messy CF's API is it's hard to say that this would even work as expected - the existing request somehow has worked for me even though it probably shouldn't.
The bukkit
endpoint exists but is basically empty. All actual Bukkit versions are available via the minecraft
endpoint instead. The API's version-types (https://minecraft.curseforge.com/api/game/version-types?token=<your token>
) does not yield Bukkit at all, but Bukkit's version ID is 1. This can be confirmed by viewing source for Bukkit/CF pages.
Project on Curseforge's file:
<p class="text-gray-500 font-bold mb-2">Supported Bukkit Versions</p>
<div class="form-controls convert-list" id="field-game-version-1">
<li class="list-none field-choice field-choice-radio form-game-version-container form-game-version-container-1-18-2">
<label for="field-game-version-1-1.18.2">
<input type="checkbox" name="ff58f8aa7e8f8368fe36153765e3f1cd7" value="9016" checked="checked" id="field-game-version-1-1.18.2" class="form-game-version-container form-game-version-container-1-18-2" />
<span>
1.18.2
</span>
</label>
</li>
<li class="list-none field-choice field-choice-radio form-game-version-container form-game-version-container-1-18-1">
<label for="field-game-version-1-1.18.1">
<input type="checkbox" name="ff58f8aa7e8f8368fe36153765e3f1cd7" value="8897" id="field-game-version-1-1.18.1" class="form-game-version-container form-game-version-container-1-18-1" />
<span>
1.18.1
</span>
</label>
</li>
...
Same project on devbukkit:
<section class="e-game-versions">
<h3>Supported Bukkit Versions</h3>
<!-- Field -->
<ul class="covert-list checkbox form-game-version-container form-field-model-multiple-choice-field`1" id="field-game-version-1">
<li class="field-choice field-choice-radio form-game-version-container form-game-version-container-1-18-2">
<label for="field-game-version-1-1-18-2">
<input type="checkbox"
name="fe93305e74d3d1a5a6380ebcbd3b70383"
value="9016"
id="field-game-version-1-1-18-2"
class="form-game-version-container form-game-version-container-1-18-2" />
<span>
1.18.2
</span>
</label>
</li>
<li class="field-choice field-choice-radio form-game-version-container form-game-version-container-1-18-1">
<label for="field-game-version-1-1-18-1">
<input type="checkbox"
name="fe93305e74d3d1a5a6380ebcbd3b70383"
value="8897"
id="field-game-version-1-1-18-1"
class="form-game-version-container form-game-version-container-1-18-1" />
<span>
1.18.1
</span>
</label>
</li>
...
From https://minecraft.curseforge.com/api/game/versions?token=<your token>
:
{
"id": 9016,
"gameVersionTypeID": 1,
"name": "1.18.2",
"slug": "1-18-2"
},
...
It's pretty clear both from the base list and the actual entries' data that the game ID is 1. However, as Bukkit does not exist in the version-types
output, I cannot specify Bukkit:1.18.2
when using the action to guarantee that ID 9016
will be selected. I don't believe including a hardcoded list of additional game IDs is a good idea, so I want to be able to instead use 1:1.18.2
and have it yield the same result that Bukkit:1.18.2
would if CF actually had Bukkit in the version types list.
Bumping major (v2->v3) for dependency updates basically makes everyone that isn't targeting latest commit to get outdated versions of the action. Since Github recommends (and suggests the code for in the marketplace) tagging the release with a major in the action workflow, that's most of the users.
AFAIK, Github follows semver, which basically means that you should only bump major in case there are are "backwards-incompatible changes", like changing required arguments, etc. Other changes (dep updates, fixes, small additions that don't break old workflows, etc) shouldn't bump major, but either minor or patch.
Don't worry about the v3 now, that one is already released, but please don't do it for the next versions, imagine the deps update include security issues or something more important, you would be letting users out.
Thanks!
You can close this.
In case of an invalid typeId
, the filter at
curseforge-upload/curseforge-upload.js
Lines 66 to 68 in cc1334d
TypeError: Cannot read properties of undefined (reading 'id')
atcurseforge-upload/curseforge-upload.js
Line 73 in cc1334d
Use the invalid:1.18.2
for game_versions
property.
A meaning full error telling me I used invalid typeId
and exit gracefully.
TypeError
crash
When a file/mod is uploaded to CF, it'll be displayed under the following URL:
https://www.curseforge.com/minecraft/mc-mods/notfmcplease/files/3531003
That last part: 3531003 is something i would want to append to a message i post on discord like:
messagefordiscord: Hey you can download the file at: https://www.curseforge.com/minecraft/mc-mods/notfmcplease/files/${{ thatfile_id }}
I'm pretty sure you've already included this at: https://github.com/itsmeow/curseforge-upload/blob/master/action.yml#L38
But i'm not sure what the name of that variable is :P
Is this currently possible? If so how would I go about doing that, otherwise could it be added?
https://www.curseforge.com/minecraft/mc-mods/customskinloader/files/4480815
This is a mod made by my friend that supports multiple versions, how do I fill in so many supported versions in the game_versions option?
i would like an optional parameter which allows you to change the name of the .jar before upload,
e.g
with:
token: ${{ secrets.CF_API_KEY }}
project_id: ID
game_endpoint: minecraft
file_path: build/libs/modid-1.0.jar
rename-file: mod.jar
changelog: updated mod, changelog on github
display_name: mod
game_versions: 1.15.2,Java 8,Forge
release_type: alpha
it will upload the exact thing of modid-1.0.jar, but will rename it to jarm.jar and upload the renamed file
A feature that you also can upload the serverpack with it.
##[debug]Request meta: {"changelog":"### [1.12.1](https://github.com/Wynntils/Wynntils/compare/v1.12.0...v1.12.1) (2022-09-09)\n\n\n### Bug Fixes\n\n* **test:** test release ([6a8d4bd](https://github.com/Wynntils/Wynntils/commit/6a8d4bdf1c552401448443be64af8a2d1749add7))","gameVersions":[6756,8867,4458],"releaseType":"beta","changelogType":"markdown","displayName":"Wynntils-v1.12.1"}
/home/runner/work/_actions/itsmeow/curseforge-upload/v3/dist/index.js:11402
`Request error:${err}\nResponse body:\n${response.body}\nRequest body:${body}`
^
TypeError: Cannot read properties of undefined (reading 'body')
at Request._callback (/home/runner/work/_actions/itsmeow/curseforge-upload/v3/dist/index.js:11402:61)
at self.callback (/home/runner/work/_actions/itsmeow/curseforge-upload/v3/dist/index.js:[127](https://github.com/Wynntils/Wynntils/runs/8270267496?check_suite_focus=true#step:3:128)55:22)
at Request.emit (node:events:390:28)
at FormData.<anonymous> (/home/runner/work/_actions/itsmeow/curseforge-upload/v3/dist/index.js:13824:10)
at FormData.emit (node:events:402:35)
at FormData.module.exports.547.CombinedStream._emitError (/home/runner/work/_actions/itsmeow/curseforge-upload/v3/dist/index.js:16414:8)
at DelayedStream.<anonymous> (/home/runner/work/_actions/itsmeow/curseforge-upload/v3/dist/index.js:16340:10)
at DelayedStream.emit (node:events:402:35)
at DelayedStream.module.exports.152.DelayedStream._handleEmit (/home/runner/work/_actions/itsmeow/curseforge-upload/v3/dist/index.js:1925:15)
at ReadStream.source.emit (/home/runner/work/_actions/itsmeow/curseforge-upload/v3/dist/index.js:1872:19)
After sending the request manually, this was the response from curseforge:
Status Code: 400
Response:
{
"errorCode": 1009,
"errorMessage": "Invalid game version ID: 8867 belongs to an invalid dependency."
}
I have added the correct ID but thought I should report that the error was not caught properly.
Sorry to open an issue - I'm aware this is not a problem of curseforge-upload, but I'm hoping to find out what the reason might be (seeing as that the API returns no error information).
This workflow file at this step leads to the error.
Manually uploading the same file with the same settings via the CurseForge website works.
Interestingly, this very similar workflow file at the same step, works without issue as well.
Any ideas on what might be going wrong, or how to find out, would be appreciated.
Thank you!
It would be handy if the file_path input would, if given only a path, to get the first occurrence of a .jar.
This way, people don't have to make an extra step to refer to the exact jar they want to upload.
If multiple .jar's are found, throw an warning but get the first occurrence.
You think this is a good idea?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.