Skip to content

Update Pumpkin Market Listing ​v0.0.3

Use this action to update metadata on a Pumpkin Market listing that already exists. Provide the metadata in a JSON file, through direct inputs, or both. This action only changes listing metadata; it doesn't read info.ts, build or upload a WASM file, create listings, or upload screenshots.

See the action guide and API reference on the documentation site.

Add a step like this to your workflow. Store the Market API token as a GitHub secret and make sure it can update listings:

yaml
steps:
  - uses: filiphsps/pumpkin-plugins/actions/update-pumpkin-market-listing@update-pumpkin-market-listing-v0.0.3
    with:
      plugin-id: ${{ vars.PUMPKIN_MARKET_PLUGIN_ID }}
      metadata-file: .github/market-metadata.json
      api-token: ${{ secrets.MARKET_API_TOKEN }}

The example pins this action to its current Release Please tag. Action releases are independent of plugin releases and other actions.

Metadata sources ​

Choose the existing listing with exactly one of plugin-name or plugin-id. A name lookup reads up to 10 pages of Market search results and must match the full listing name, ignoring case; plugin-id accepts a numeric database ID or public ID.

The metadata file must be a JSON object that uses Market field names. You can provide direct inputs on their own or layer them over the file; when both sources set the same field, the direct input wins. This example sets the English description and the commands shown on the listing:

json
{
  "translatedDescriptions": {
    "en-US": "A description shown on the Market listing"
  },
  "commands": [
    {
      "name": "hello",
      "aliases": ["hi"],
      "permission": "Example:command.hello",
      "description": { "en-US": "Say hello" },
      "display_order": 0
    }
  ]
}

The description input sets the en-US entry in translatedDescriptions and preserves other locales. If both sources set the English description, the direct input wins.

By default, update-mode is patch: the action sends only the fields you provide and leaves the rest of the listing unchanged. Empty direct inputs are ignored, so use the metadata file when you need to send an explicit empty value. Set update-mode to full to require every listing field: name, category, sourceLink, youtubeVideoUrl, keywords, translatedDescriptions, isEarlyAccess, and commands.

Inputs ​

InputRequiredDefaultDescription
plugin-nameNoExact listing name; set this or plugin-id, but not both
plugin-idNoNumeric database ID or public ID; set this or plugin-name, but not both
metadata-fileNoPath to a JSON object containing listing metadata; combine with direct inputs if needed
display-nameNoListing display name (metadata field name)
descriptionNoDefault en-US listing description; overrides that locale in translated-descriptions
categoryNoListing category
source-linkNoListing source URL
youtube-video-urlNoListing YouTube video URL
keywordsNoComma-separated listing search keywords
translated-descriptionsNoJSON object mapping locale codes to listing descriptions
is-early-accessNoWhether the listing is marked as early access (true or false)
commandsNoJSON array of listing commands with names, optional aliases and permissions, localized descriptions, display order, and IDs
update-modeNopatchMetadata validation mode, patch or full; full requires all listing metadata fields
api-tokenYesMarket API token with listing update permission
api-urlNohttps://market.pumpkinmc.orgPumpkin Market base URL; must use https

Outputs ​

OutputDescription
listing-idResolved numeric Market database ID
listing-nameCanonical Market listing name
statusOperation result (success after a completed update)

Development ​

To change the action, add inputs and outputs to action.yml, implement the behavior in src/index.mjs, and add tests in src/*.test.mjs. The input and output tables above are generated from action.yml, so run pnpm readme after changing the action metadata. In the implementation, use getInput() from ../../common/src/utils.mjs to read GitHub inputs; it preserves hyphens in names such as plugin-name. action.yml declares src/index.mjs as the Node runtime entry point, so no separate build step is needed.

pumpkin-plugins documentation