Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Categories error #22

Closed
AlphaGaming7780 opened this issue Jun 5, 2023 · 6 comments
Closed

Categories error #22

AlphaGaming7780 opened this issue Jun 5, 2023 · 6 comments

Comments

@AlphaGaming7780
Copy link

Hey, I have this error when publishing :

Error: ERROR: Unexpected response from the server while publishing package: Status code: 400 BadRequest {"categories":{"2":["Object not found"],"3":["Object not found"],"4":["Object not found"]}} Exiting

And here are my categories in my publish.yml.

          categories: |
            mods
            client-side
            custom-menus
            language-en
            language-cn
@AnActualEmerald
Copy link
Member

I think I know what the issue is here, it's probably an upstream issue with thunderstore itself. I'll add a workaround for now and if that works I'll make an issue myself on the thunderstore repo

@AnActualEmerald
Copy link
Member

Can you try setting the action version to ad676fb6814de065430f226de9930cec3c811bb3, and then add

repo: northstar.thunderstore.io

to the action inputs?

@AlphaGaming7780
Copy link
Author

I don't understand what I need to edit, so here is my .yml file. Please let me know where I need to make changes.

name: Publish package

on:
  release:
    types: [published] # run when a new release is published
    
env:
  name: ${{github.event.repository.name}} # Edit this if the package name differs from the repo name

jobs:
  verify:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v3
      - name: Get clean version
        run: |
          echo cleanVersion=$(echo ${{github.ref_name}} | sed s/v//g) >> $GITHUB_ENV
      - name: Check that version matches
        run: |
          if [[ "$(grep -Po "\d+\.\d+\.\d+" $(find ./ -name mod.json))" != "${{ env.cleanVersion }}" ]]; then
            echo "::debug::${{env.cleanVersion}}"
            echo "::debug::$(cat $(find ./ -name mod.json ))"
            echo "::error::Version in mod.json does not match tag version"
            exit 1
          fi
  publish:
    runs-on: ubuntu-latest
    needs: verify
    steps:
      - uses: actions/checkout@v3
      - name: Upload Thunderstore Package
        uses: GreenTF/upload-thunderstore-package@v4
        with:
          community: northstar
          # Name of the team to publish the mod under
          # This should be modified if your github username is different than your team name on Thunderstore
          namespace: TritonSupreme # <------ DOUBLE CHECK THIS
          # Name of the package
          name: ${{ env.name }} # This can be modified if the package name differs from the repo name
          # Package version to publish
          version: ${{ github.ref_name }} # This is the tag that was created in the release
          # Description of the mod
          description: An enhanced mod that revolutionizes the game's server browser menu, offering a streamlined and immersive experience. # <----------- UPDATE THIS
          # Thunderstore API token
          token: ${{ secrets.TS_KEY }} 
          # Directory to wrap the contents of the repo in
          wrap: mods/${{ github.repository_owner }}.${{ env.name }} # This will wrap your Author.ModName folder in a mods/ folder before publishing
          #deps: "northstar-Northstar@1.9.3" # <------------- Uncomment this line to add dependencies to your mod, each sparated by a space
          categories: |
            mods
            client-side
            custom-menus
            language-en
            language-cn

@AnActualEmerald
Copy link
Member

jobs:
  verify:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v3
      - name: Get clean version
        run: |
          echo cleanVersion=$(echo ${{github.ref_name}} | sed s/v//g) >> $GITHUB_ENV
      - name: Check that version matches
        run: |
          if [[ "$(grep -Po "\d+\.\d+\.\d+" $(find ./ -name mod.json))" != "${{ env.cleanVersion }}" ]]; then
            echo "::debug::${{env.cleanVersion}}"
            echo "::debug::$(cat $(find ./ -name mod.json ))"
            echo "::error::Version in mod.json does not match tag version"
            exit 1
          fi
  publish:
    runs-on: ubuntu-latest
    needs: verify
    steps:
      - uses: actions/checkout@v3
      - name: Upload Thunderstore Package
        uses: GreenTF/upload-thunderstore-package@ad676fb6814de065430f226de9930cec3c811bb3
        with:
          community: northstar
          # Name of the team to publish the mod under
          # This should be modified if your github username is different than your team name on Thunderstore
          namespace: TritonSupreme # <------ DOUBLE CHECK THIS
          # Name of the package
          name: ${{ env.name }} # This can be modified if the package name differs from the repo name
          # Package version to publish
          version: ${{ github.ref_name }} # This is the tag that was created in the release
          # Description of the mod
          description: An enhanced mod that revolutionizes the game's server browser menu, offering a streamlined and immersive experience. # <----------- UPDATE THIS
          # Thunderstore API token
          token: ${{ secrets.TS_KEY }} 
          # Directory to wrap the contents of the repo in
          wrap: mods/${{ github.repository_owner }}.${{ env.name }} # This will wrap your Author.ModName folder in a mods/ folder before publishing
          #deps: "northstar-Northstar@1.9.3" # <------------- Uncomment this line to add dependencies to your mod, each sparated by a space
          repo: northstar.thunderstore.io
          categories: |
            mods
            client-side
            custom-menus
            language-en
            language-cn

@AnActualEmerald
Copy link
Member

You'll have to delete the release you made and the tag that was created for it, then publish the release again after you update the action file

@AlphaGaming7780
Copy link
Author

AlphaGaming7780 commented Jun 5, 2023

Okay, it's working.

The mod has been updated on Thunderstore and now has the correct categories.

Should I close the issue or leave it open so that you can link it to the commit or any other relevant information ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants