Help with setting up publish on release
I followed the set up instructions as well as I think I have however I got the following error after creating a "release"
Configure tcli
Init tcli config
WARNING: Unable to find project configuration file
Looked from /thunderstore.toml
ERROR: Invalid configuration to run 'init' command
Invalid package version number "release". Version numbers must follow the Major.Minor.Patch format (e.g. 1.45.320)
Exiting
https://github.com/Phyore/test-lethal-modpack/actions/runs/10459752507/job/28964411620
Could you re-run that workflow and check the "enable debug" box, then post those logs please? I didn't see anything obviously wrong with your configuration so I'm not sure what's up.
I have re-run that! logs_27348010290.zip
Okay I think I have an idea what's happening, I'm away from my computer right now so I can't test it myself though
Try changing this:
on:
release:
types: [published]
To this:
on:
push:
tags:
- *.*.*
You'll have to delete the v0.0.1 tag that you created for the release and recreate it but I think that will fix the issue. If that works I'll update the readme too.
I updated it to the following as everywhere I could see showed using some quotes around it:
push:
tags:
- '*'
Getting:
ERROR: Unexpected response from the server while publishing package: Status code: 400 BadRequest {"community_categories":["Category skills does not exist in community riskofrain2"]} Exiting
Oh I'm sorry I didn't notice this before, you aren't using the most recent version of the action which actually fixes that error:
- uses: GreenTF/[email protected]
Should be
- uses: GreenTF/[email protected]
And also actions/checkout@v3 should be updated to actions/checkout@v4 thought that's not related to any of the issues you've been having.
Just changed it and still getting:
Writing /manifest.json
Successfully built Phyore-PhyPack-0.0.4
Publish to https://thunderstore.dev/
Error: ERROR: Unexpected response from the server while publishing package: Status code: 400 BadRequest {"community_categories":["Category skills does not exist in community riskofrain2"]} Exiting
name: Publish Mod
# Run when a new release is... released
on:
push:
tags:
- '*'
jobs:
publish:
runs-on: ubuntu-latest
steps:
# Use checkout to publish the files in your repo
- uses: actions/checkout@v3
- uses: GreenTF/[email protected]
with:
namespace: Phyore # the thunderstore 'team' to publish under
description: Test Modpack
token: ${{ secrets.DEV_THUNDERSTORE_SERVICE_KEY }}
name: PhyPack # the name of the package
dev: true
version: ${{ github.ref_name }} # Use the tag as the package version
community: lethal-company
categories: | # <-- notice this pipe character
modpacks
Okay last thing I noticed, because you have dev set, the action will try to publish your mod to thunderstore.dev rather than thunderstore.io, but thunderstore.dev has its own list of communities with their own categories. The issue I think is that .dev doesn't have a lethal company community, so it defaults back to riskofrain2, which doesn't have a modpacks category (the error says it's complaining about a "skills" category but I don't know why that is).
So either you can remove dev: true and publish your mod to the lethal company community on thunderstore.io or you can remove the categories you have set and set the community to riskofrain2 or test, either of which should work.
Sorry about all this, there's a lot of minutiae and thunderstore's errors often aren't super helpful
Removed the dev param and updated to use my live key and get the below.
Successfully built Phyore-PhyPack-0.0.7
Publish to
Unhandled exception. System.Net.Http.HttpRequestException: Name or service not known (file:443)
---> System.Net.Sockets.SocketException (0xFFFDFFFF): Name or service not known
at System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs.ThrowException(SocketError, CancellationToken)
at System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs.System.Threading.Tasks.Sources.IValueTaskSource.GetResult(Int16)
at System.Net.Sockets.Socket.<ConnectAsync>g__WaitForConnectWithCancellation|281_0(AwaitableSocketAsyncEventArgs, ValueTask, CancellationToken)
at System.Net.Http.HttpConnectionPool.ConnectToTcpHostAsync(String, Int32, HttpRequestMessage, Boolean, CancellationToken)
--- End of inner exception stack trace ---
at System.Net.Http.HttpConnectionPool.ConnectToTcpHostAsync(String, Int32, HttpRequestMessage, Boolean, CancellationToken)
at System.Net.Http.HttpConnectionPool.ConnectAsync(HttpRequestMessage, Boolean, CancellationToken)
at System.Net.Http.HttpConnectionPool.CreateHttp11ConnectionAsync(HttpRequestMessage, Boolean, CancellationToken)
at System.Net.Http.HttpConnectionPool.AddHttp11ConnectionAsync(QueueItem)
at System.Threading.Tasks.TaskCompletionSourceWithCancellation`1.WaitWithCancellation(CancellationToken)
at System.Threading.Tasks.TaskCompletionSourceWithCancellation`1.WaitWithCancellationAsync(Boolean, CancellationToken)
at System.Net.Http.HttpConnectionPool.HttpConnectionWaiter`1.WaitForConnectionAsync(Boolean, CancellationToken)
at System.Net.Http.HttpConnectionPool.SendWithVersionDetectionAndRetryAsync(HttpRequestMessage, Boolean, Boolean, CancellationToken)
at System.Net.Http.HttpMessageHandlerStage.Send(HttpRequestMessage, CancellationToken)
at System.Net.Http.DiagnosticsHandler.SendAsync(HttpRequestMessage, Boolean, CancellationToken)
at System.Net.Http.RedirectHandler.SendAsync(HttpRequestMessage, Boolean, CancellationToken)
at System.Net.Http.HttpMessageHandlerStage.Send(HttpRequestMessage, CancellationToken)
at System.Net.Http.SocketsHttpHandler.Send(HttpRequestMessage, CancellationToken)
at System.Net.Http.HttpClient.Send(HttpRequestMessage request, HttpCompletionOption completionOption, CancellationToken cancellationToken)
at ThunderstoreCLI.Commands.PublishCommand.InitiateUploadRequest(Config config, String filepath)
at ThunderstoreCLI.Commands.PublishCommand.PublishFile(Config config, String filepath)
at ThunderstoreCLI.Program.HandleParsed(BaseOptions parsed)
at ThunderstoreCLI.Program.Main(String[] args)
Okay, I've rewritten basically the entire action and hopefully now everything will work, or at the very least will be more obvious what's happening I hope. Try replacing the version with this:
- uses: GreenTF/upload-thunderstore-package@374b4c272b87920e1642acec3b4c91c7196718c3
Updated to use that uses, getting the following now!
Run GreenTF/upload-thunderstore-package@374b4c272b87920e1642acec3b4c91c7196718c3
with:
namespace: Phyore
description: Test Modpack
token: ***
name: PhyPack
version: v0.0.8
community: lethal-company
categories: modpacks
/usr/bin/docker run --name e30122cdf7f584ac3d4ea5abff0e8c0214b955_fe7b4a --label e30122 --workdir /github/workspace --rm -e "INPUT_NAMESPACE" -e "INPUT_DESCRIPTION" -e "INPUT_TOKEN" -e "INPUT_NAME" -e "INPUT_VERSION" -e "INPUT_COMMUNITY" -e "INPUT_CATEGORIES" -e "INPUT_PATH" -e "INPUT_ICON" -e "INPUT_README" -e "INPUT_DEV" -e "INPUT_WRAP" -e "INPUT_WEBSITE" -e "INPUT_DEPS" -e "INPUT_NSFW" -e "INPUT_FILE" -e "INPUT_REPO" -e "TCLI_AUTH_TOKEN" -e "TS_COMMUNITY" -e "TS_NAMESPACE" -e "TS_NAME" -e "TS_VERSION" -e "TS_DESC" -e "TS_ICON" -e "TS_README" -e "TS_PATH" -e "TS_DEV" -e "TS_WRAP" -e "TS_WEBSITE" -e "TS_CATEGORIES" -e "TS_DEPS" -e "TS_NSFW" -e "TS_FILE" -e "TS_REPO" -e "HOME" -e "GITHUB_JOB" -e "GITHUB_REF" -e "GITHUB_SHA" -e "GITHUB_REPOSITORY" -e "GITHUB_REPOSITORY_OWNER" -e "GITHUB_REPOSITORY_OWNER_ID" -e "GITHUB_RUN_ID" -e "GITHUB_RUN_NUMBER" -e "GITHUB_RETENTION_DAYS" -e "GITHUB_RUN_ATTEMPT" -e "GITHUB_REPOSITORY_ID" -e "GITHUB_ACTOR_ID" -e "GITHUB_ACTOR" -e "GITHUB_TRIGGERING_ACTOR" -e "GITHUB_WORKFLOW" -e "GITHUB_HEAD_REF" -e "GITHUB_BASE_REF" -e "GITHUB_EVENT_NAME" -e "GITHUB_SERVER_URL" -e "GITHUB_API_URL" -e "GITHUB_GRAPHQL_URL" -e "GITHUB_REF_NAME" -e "GITHUB_REF_PROTECTED" -e "GITHUB_REF_TYPE" -e "GITHUB_WORKFLOW_REF" -e "GITHUB_WORKFLOW_SHA" -e "GITHUB_WORKSPACE" -e "GITHUB_ACTION" -e "GITHUB_EVENT_PATH" -e "GITHUB_ACTION_REPOSITORY" -e "GITHUB_ACTION_REF" -e "GITHUB_PATH" -e "GITHUB_ENV" -e "GITHUB_STEP_SUMMARY" -e "GITHUB_STATE" -e "GITHUB_OUTPUT" -e "RUNNER_OS" -e "RUNNER_ARCH" -e "RUNNER_NAME" -e "RUNNER_ENVIRONMENT" -e "RUNNER_TOOL_CACHE" -e "RUNNER_TEMP" -e "RUNNER_WORKSPACE" -e "ACTIONS_RUNTIME_URL" -e "ACTIONS_RUNTIME_TOKEN" -e "ACTIONS_CACHE_URL" -e "ACTIONS_RESULTS_URL" -e GITHUB_ACTIONS=true -e CI=true -v "/var/run/docker.sock":"/var/run/docker.sock" -v "/home/runner/work/_temp/_github_home":"/github/home" -v "/home/runner/work/_temp/_github_workflow":"/github/workflow" -v "/home/runner/work/_temp/_runner_file_commands":"/github/file_commands" -v "/home/runner/work/test-lethal-modpack/test-lethal-modpack":"/github/workspace" e30122:cdf7f584ac3d4ea5abff0e8c0214b955
error: Script not found "index.ts"
Very much appreciate all the help you are providing!
Okay sixth time's the charm, I should have used an absolute path in the entrypoint. Try this commit: bc4f63784f3519bcb513f012829c2af8a03f0818
Looks like a fail on the publish part, below is the debug
2s
##[debug]Evaluating condition for step: 'Run GreenTF/upload-thunderstore-package@bc4f63784f3519bcb513f012829c2af8a03f0818'
##[debug]Evaluating: success()
##[debug]Evaluating success:
##[debug]=> true
##[debug]Result: true
##[debug]Starting: Run GreenTF/upload-thunderstore-package@bc4f63784f3519bcb513f012829c2af8a03f0818
##[debug]Loading inputs
##[debug]Evaluating: secrets.THUNDERSTORE_SERVICE_KEY
##[debug]Evaluating Index:
##[debug]..Evaluating secrets:
##[debug]..=> Object
##[debug]..Evaluating String:
##[debug]..=> 'THUNDERSTORE_SERVICE_KEY'
##[debug]=> '***'
##[debug]Result: '***'
##[debug]Evaluating: github.ref_name
##[debug]Evaluating Index:
##[debug]..Evaluating github:
##[debug]..=> Object
##[debug]..Evaluating String:
##[debug]..=> 'ref_name'
##[debug]=> 'v0.0.9'
##[debug]Result: 'v0.0.9'
##[debug]Loading env
Run GreenTF/upload-thunderstore-package@bc4f63784f3519bcb513f012829c2af8a03f0818
##[debug]Evaluating: inputs.token
##[debug]Evaluating Index:
##[debug]..Evaluating inputs:
##[debug]..=> Object
##[debug]..Evaluating String:
##[debug]..=> 'token'
##[debug]=> '***'
##[debug]Result: '***'
##[debug]Evaluating: inputs.community
##[debug]Evaluating Index:
##[debug]..Evaluating inputs:
##[debug]..=> Object
##[debug]..Evaluating String:
##[debug]..=> 'community'
##[debug]=> 'lethal-company'
##[debug]Result: 'lethal-company'
##[debug]Evaluating: inputs.namespace
##[debug]Evaluating Index:
##[debug]..Evaluating inputs:
##[debug]..=> Object
##[debug]..Evaluating String:
##[debug]..=> 'namespace'
##[debug]=> 'Phyore'
##[debug]Result: 'Phyore'
##[debug]Evaluating: inputs.name
##[debug]Evaluating Index:
##[debug]..Evaluating inputs:
##[debug]..=> Object
##[debug]..Evaluating String:
##[debug]..=> 'name'
##[debug]=> 'PhyPack'
##[debug]Result: 'PhyPack'
##[debug]Evaluating: inputs.version
##[debug]Evaluating Index:
##[debug]..Evaluating inputs:
##[debug]..=> Object
##[debug]..Evaluating String:
##[debug]..=> 'version'
##[debug]=> 'v0.0.9'
##[debug]Result: 'v0.0.9'
##[debug]Evaluating: inputs.description
##[debug]Evaluating Index:
##[debug]..Evaluating inputs:
##[debug]..=> Object
##[debug]..Evaluating String:
##[debug]..=> 'description'
##[debug]=> 'Test Modpack'
##[debug]Result: 'Test Modpack'
##[debug]Evaluating: inputs.icon
##[debug]Evaluating Index:
##[debug]..Evaluating inputs:
##[debug]..=> Object
##[debug]..Evaluating String:
##[debug]..=> 'icon'
##[debug]=> ''
##[debug]Result: ''
##[debug]Evaluating: inputs.readme
##[debug]Evaluating Index:
##[debug]..Evaluating inputs:
##[debug]..=> Object
##[debug]..Evaluating String:
##[debug]..=> 'readme'
##[debug]=> ''
##[debug]Result: ''
##[debug]Evaluating: inputs.path
##[debug]Evaluating Index:
##[debug]..Evaluating inputs:
##[debug]..=> Object
##[debug]..Evaluating String:
##[debug]..=> 'path'
##[debug]=> ''
##[debug]Result: ''
##[debug]Evaluating: inputs.dev
##[debug]Evaluating Index:
##[debug]..Evaluating inputs:
##[debug]..=> Object
##[debug]..Evaluating String:
##[debug]..=> 'dev'
##[debug]=> ''
##[debug]Result: ''
##[debug]Evaluating: inputs.wrap
##[debug]Evaluating Index:
##[debug]..Evaluating inputs:
##[debug]..=> Object
##[debug]..Evaluating String:
##[debug]..=> 'wrap'
##[debug]=> ''
##[debug]Result: ''
##[debug]Evaluating: inputs.website
##[debug]Evaluating Index:
##[debug]..Evaluating inputs:
##[debug]..=> Object
##[debug]..Evaluating String:
##[debug]..=> 'website'
##[debug]=> ''
##[debug]Result: ''
##[debug]Evaluating: inputs.categories
##[debug]Evaluating Index:
##[debug]..Evaluating inputs:
##[debug]..=> Object
##[debug]..Evaluating String:
##[debug]..=> 'categories'
##[debug]=> 'modpacks
##[debug]'
##[debug]Result: 'modpacks
##[debug]'
##[debug]Evaluating: inputs.deps
##[debug]Evaluating Index:
##[debug]..Evaluating inputs:
##[debug]..=> Object
##[debug]..Evaluating String:
##[debug]..=> 'deps'
##[debug]=> ''
##[debug]Result: ''
##[debug]Evaluating: inputs.nsfw
##[debug]Evaluating Index:
##[debug]..Evaluating inputs:
##[debug]..=> Object
##[debug]..Evaluating String:
##[debug]..=> 'nsfw'
##[debug]=> ''
##[debug]Result: ''
##[debug]Evaluating: inputs.file
##[debug]Evaluating Index:
##[debug]..Evaluating inputs:
##[debug]..=> Object
##[debug]..Evaluating String:
##[debug]..=> 'file'
##[debug]=> ''
##[debug]Result: ''
##[debug]Evaluating: inputs.repo
##[debug]Evaluating Index:
##[debug]..Evaluating inputs:
##[debug]..=> Object
##[debug]..Evaluating String:
##[debug]..=> 'repo'
##[debug]=> ''
##[debug]Result: ''
/usr/bin/docker run --name ad7668992b6465374469ab78ec2136c72fc87_1bccfb --label 6ad766 --workdir /github/workspace --rm -e "INPUT_NAMESPACE" -e "INPUT_DESCRIPTION" -e "INPUT_TOKEN" -e "INPUT_NAME" -e "INPUT_VERSION" -e "INPUT_COMMUNITY" -e "INPUT_CATEGORIES" -e "INPUT_PATH" -e "INPUT_ICON" -e "INPUT_README" -e "INPUT_DEV" -e "INPUT_WRAP" -e "INPUT_WEBSITE" -e "INPUT_DEPS" -e "INPUT_NSFW" -e "INPUT_FILE" -e "INPUT_REPO" -e "TCLI_AUTH_TOKEN" -e "TS_COMMUNITY" -e "TS_NAMESPACE" -e "TS_NAME" -e "TS_VERSION" -e "TS_DESC" -e "TS_ICON" -e "TS_README" -e "TS_PATH" -e "TS_DEV" -e "TS_WRAP" -e "TS_WEBSITE" -e "TS_CATEGORIES" -e "TS_DEPS" -e "TS_NSFW" -e "TS_FILE" -e "TS_REPO" -e "HOME" -e "GITHUB_JOB" -e "GITHUB_REF" -e "GITHUB_SHA" -e "GITHUB_REPOSITORY" -e "GITHUB_REPOSITORY_OWNER" -e "GITHUB_REPOSITORY_OWNER_ID" -e "GITHUB_RUN_ID" -e "GITHUB_RUN_NUMBER" -e "GITHUB_RETENTION_DAYS" -e "GITHUB_RUN_ATTEMPT" -e "GITHUB_REPOSITORY_ID" -e "GITHUB_ACTOR_ID" -e "GITHUB_ACTOR" -e "GITHUB_TRIGGERING_ACTOR" -e "GITHUB_WORKFLOW" -e "GITHUB_HEAD_REF" -e "GITHUB_BASE_REF" -e "GITHUB_EVENT_NAME" -e "GITHUB_SERVER_URL" -e "GITHUB_API_URL" -e "GITHUB_GRAPHQL_URL" -e "GITHUB_REF_NAME" -e "GITHUB_REF_PROTECTED" -e "GITHUB_REF_TYPE" -e "GITHUB_WORKFLOW_REF" -e "GITHUB_WORKFLOW_SHA" -e "GITHUB_WORKSPACE" -e "GITHUB_ACTION" -e "GITHUB_EVENT_PATH" -e "GITHUB_ACTION_REPOSITORY" -e "GITHUB_ACTION_REF" -e "GITHUB_PATH" -e "GITHUB_ENV" -e "GITHUB_STEP_SUMMARY" -e "GITHUB_STATE" -e "GITHUB_OUTPUT" -e "RUNNER_DEBUG" -e "RUNNER_OS" -e "RUNNER_ARCH" -e "RUNNER_NAME" -e "RUNNER_ENVIRONMENT" -e "RUNNER_TOOL_CACHE" -e "RUNNER_TEMP" -e "RUNNER_WORKSPACE" -e "ACTIONS_RUNTIME_URL" -e "ACTIONS_RUNTIME_TOKEN" -e "ACTIONS_CACHE_URL" -e "ACTIONS_RESULTS_URL" -e GITHUB_ACTIONS=true -e CI=true -v "/var/run/docker.sock":"/var/run/docker.sock" -v "/home/runner/work/_temp/_github_home":"/github/home" -v "/home/runner/work/_temp/_github_workflow":"/github/workflow" -v "/home/runner/work/_temp/_runner_file_commands":"/github/file_commands" -v "/home/runner/work/test-lethal-modpack/test-lethal-modpack":"/github/workspace" 6ad766:8992b6465374469ab78ec2136c72fc87
::group::Set up environment
Set up environment
::group::Configure tcli
Configure tcli
::group::Publish package
Publish package
Publishing with target repoitory ''
Error: Tcli encountered an error while publishing
Error: Building Phyore-PhyPack-0.0.9
Output path /build/Phyore-PhyPack-0.0.9.zip
Planning for files to include in build
--------------------------------------
Planned for /icon.png
Planned for /README.md
Planned for /manifest.json
Mapping ./dist to /
Planned for /.git/HEAD
Planned for /.git/index
Planned for /.git/shallow
Planned for /.git/description
Planned for /.git/config
Planned for /.git/FETCH_HEAD
Planned for /.git/hooks/applypatch-msg.sample
Planned for /.git/hooks/update.sample
Planned for /.git/hooks/fsmonitor-watchman.sample
Planned for /.git/hooks/pre-merge-commit.sample
Planned for /.git/hooks/pre-push.sample
Planned for /.git/hooks/commit-msg.sample
Planned for /.git/hooks/pre-commit.sample
Planned for /.git/hooks/pre-applypatch.sample
Planned for /.git/hooks/sendemail-validate.sample
Planned for /.git/hooks/post-update.sample
Planned for /.git/hooks/prepare-commit-msg.sample
Planned for /.git/hooks/push-to-checkout.sample
Planned for /.git/hooks/pre-receive.sample
Planned for /.git/hooks/pre-rebase.sample
Planned for /.git/info/exclude
Planned for /.git/logs/HEAD
Planned for /.github/workflows/publish.yml
Planned for /.git/objects/9a/549b53d66e11549bef2a17a2484e502a28fd1d
Planned for /.git/objects/51/0d3ea5fe3379334d7ff0c951d9c7b654bee606
Planned for /.git/objects/60/37b184d8a0ad07c774a391106ba4a06ab1b204
Planned for /.git/objects/5b/94f762858bac93d6a67359f9134972a4496cc9
Planned for /.git/objects/87/a81166112be1a8736812ff6aa16a23b61f6b0a
Planned for /.git/objects/0c/d7ff51fde017fbfca7caa42c77148351c35ee5
Planned for /.git/refs/tags/v0.0.9
Writing configured files
------------------------
Writing /icon.png
Writing /README.md
Writing /manifest.json
Writing /.git/HEAD
Writing /.git/index
Writing /.git/shallow
Writing /.git/description
Writing /.git/config
Writing /.git/FETCH_HEAD
Writing /.git/hooks/applypatch-msg.sample
Writing /.git/hooks/update.sample
Writing /.git/hooks/fsmonitor-watchman.sample
Writing /.git/hooks/pre-merge-commit.sample
Writing /.git/hooks/pre-push.sample
Writing /.git/hooks/commit-msg.sample
Writing /.git/hooks/pre-commit.sample
Writing /.git/hooks/pre-applypatch.sample
Writing /.git/hooks/sendemail-validate.sample
Writing /.git/hooks/post-update.sample
Writing /.git/hooks/prepare-commit-msg.sample
Writing /.git/hooks/push-to-checkout.sample
Writing /.git/hooks/pre-receive.sample
Writing /.git/hooks/pre-rebase.sample
Writing /.git/info/exclude
Writing /.git/logs/HEAD
Writing /.github/workflows/publish.yml
Writing /.git/objects/9a/549b53d66e11549bef2a17a2484e502a28fd1d
Writing /.git/objects/51/0d3ea5fe3379334d7ff0c951d9c7b654bee606
Writing /.git/objects/60/37b184d8a0ad07c774a391106ba4a06ab1b204
Writing /.git/objects/5b/94f762858bac93d6a67359f9134972a4496cc9
Writing /.git/objects/87/a81166112be1a8736812ff6aa16a23b61f6b0a
Writing /.git/objects/0c/d7ff51fde017fbfca7caa42c77148351c35ee5
Writing /.git/refs/tags/v0.0.9
Successfully built Phyore-PhyPack-0.0.9
Publishing /build/Phyore-PhyPack-0.0.9.zip
##[debug]Docker Action run completed with exit code 1
##[debug]Finishing: Run GreenTF/upload-thunderstore-package@bc4f63784f3519bcb513f012829c2af8a03f0818
Okay I stepped away for a bit an finally realized what the original issue was here, try this commit now this should solve it 87a940b1f508ab1a6866eded55a9539afdf09792 (the short version is I forgot how ?? actually works in js`
Looks like the action was successful! Thank you!