diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 03e519f..ecf8b2a 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -395,15 +395,17 @@ jobs: client-id: ${{ vars.AZURE_CLIENT_ID }} tenant-id: ${{ vars.AZURE_TENANT_ID }} allow-no-subscriptions: true - # the Entra ID identity must be a Contributor on the publisher; until it is, say which identity to add + # the Entra ID identity must be a Contributor on the publisher; until it is, say which identity to add. + # Its ID comes from connectionData, not profiles/me: an app (service principal) has no Azure DevOps + # profile, so profiles/me answers VSS011031. - name: Check Marketplace access if: steps.published.outputs.vscode_marketplace != 'true' run: | if npx --yes @vscode/vsce@4.0.0 verify-pat --azure-credential stringutilitybelt; then exit 0; fi - profile="$(az rest --method get --resource 499b84ac-1321-427f-aa17-267ca6975798 \ - --url 'https://app.vssps.visualstudio.com/_apis/profile/profiles/me?api-version=7.1-preview.3' \ - --query id --output tsv || true)" - echo "::error::This identity can't publish as stringutilitybelt. Add member ID ${profile:-(unknown)} to the publisher as a Contributor (RELEASING.md, VS Code Marketplace), then re-run this job." + member="$(az rest --method get --resource 499b84ac-1321-427f-aa17-267ca6975798 \ + --url 'https://app.vssps.visualstudio.com/_apis/connectionData' \ + --query authenticatedUser.id --output tsv || true)" + echo "::error::This identity can't publish as stringutilitybelt. Add member ID ${member:-(unknown)} to the publisher as a Contributor (RELEASING.md, VS Code Marketplace), then re-run this job." exit 1 - name: Publish to the VS Code Marketplace if: steps.published.outputs.vscode_marketplace != 'true' diff --git a/RELEASING.md b/RELEASING.md index 06fe902..da5d832 100644 --- a/RELEASING.md +++ b/RELEASING.md @@ -260,7 +260,7 @@ no Azure subscription is needed. 4. Make the app a member of the publisher. The Marketplace adds members by their Azure DevOps ID, which only the app itself can look up, so let the workflow do it: run a release (any run that includes `vscode`). Its **Check Marketplace access** step fails with *Add member ID `` to the - publisher*. Open + publisher*: the app's Azure DevOps identity, not its client ID. Open [the publisher's page](https://marketplace.visualstudio.com/manage/publishers/stringutilitybelt) → **Members → Add**, paste the ID, role **Contributor**, add, and **Re-run failed jobs**. If the `stringutilitybelt` publisher doesn't exist yet, create it there first.