microsoft / store-submission

MIT License
43 stars 8 forks source link

How do you update the metadata/PDPs? #10

Closed riverar closed 1 year ago

riverar commented 1 year ago

I'm a StoreBroker user. I'm coming from https://github.com/microsoft/StoreBroker/issues/231 where I discovered desktop PDPs aren't part of the same API.

I can't see any way to update listings/metadata with this API/action. Is this supported?

azchohfi commented 1 year ago

Hello Rafael. Yes, this is supported.

You can leverage the 'metadata-update' argument on an 'update' command. You can use product-update, and/or metadata-update on the same command, or issue multiple commands with the other arguments omitted. Example:

      - name: Update Draft Submission
        uses: microsoft/store-submission@v1
        with:
          command: update
          product-update: '{"packages":[{"packageUrl":"https://cdn.contoso.us/prod/5.10.1.4420/ContosoIgniteInstallerFull.msi","languages":["en"],"architectures":["X64"],"isSilentInstall":true}]}'
          metadata-update: '-->JSON<--'

This JSON can be anything that is accepted on the underlying API, which is documented here: https://docs.microsoft.com/en-us/windows/uwp/publish/msiexe/store-submission-api#update-current-draft-submission-metadata-api Just be mindful that we call this with the PUT HTTP verb, not PATCH, so it is a Full Module Update. One way to achieve this full scenario is to 1st call a "get" command and store that GH variable, then patch it with whatever you want to change, and then call the update command.