Skip to content

Commit b64f442

Browse files
committed
test(release): assert OIDC publishing contract
1 parent 852551f commit b64f442

1 file changed

Lines changed: 8 additions & 2 deletions

File tree

‎test/smoke/release-contract.test.ts‎

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,9 +76,15 @@ test('release paths consume the complete single-source preflight gate', () => {
7676
assert.match(ci, /npm run release:preflight/);
7777
assert.match(releaseWorkflow, /npm run release:preflight/);
7878
assert.match(releaseAuthWorkflow, /workflow_dispatch/);
79-
assert.match(releaseAuthWorkflow, /secrets\.NPM_TOKEN/);
80-
assert.match(releaseAuthWorkflow, /npm whoami/);
79+
assert.match(releaseAuthWorkflow, /id-token:\s*write/);
80+
assert.match(releaseAuthWorkflow, /npm@11\.20\.0/);
81+
assert.match(releaseAuthWorkflow, /ACTIONS_ID_TOKEN_REQUEST_URL/);
82+
assert.doesNotMatch(releaseAuthWorkflow, /secrets\.NPM_TOKEN|npm whoami/);
8183
assert.match(publishWorkflow, /npm run release:preflight/);
84+
assert.match(publishWorkflow, /id-token:\s*write/);
85+
assert.match(publishWorkflow, /npm@11\.20\.0/);
86+
assert.match(publishWorkflow, /ACTIONS_ID_TOKEN_REQUEST_URL/);
87+
assert.doesNotMatch(publishWorkflow, /secrets\.NPM_TOKEN|npm whoami/);
8288
assert.match(publishWorkflow, /dist\.integrity/);
8389
assert.match(publishWorkflow, /dist-tags\.latest/);
8490
assert.match(publishWorkflow, /id: registry-state/);

0 commit comments

Comments
 (0)