Add informational log messaging

This commit is contained in:
Adam Turner 2023-07-24 16:39:15 +01:00
parent 258b0ea9fc
commit 1a403e4f9a

View File

@ -46,15 +46,17 @@ jobs:
}
);
const oidc_token = (await oidc_resp.json()).value;
github.log.warn(`len(oidc_token): ${oidc_token.length}`);
// exchange the OIDC token for an API token
const mint_resp = await fetch('https://test.pypi.org/_/oidc/github/mint-token', {
method: 'post',
body: '{"token": "oidc_token"}' ,
body: '{"token": oidc_token}' ,
headers: {'Content-Type': 'application/json'},
}
);
const api_token = (await mint_resp.json()).token;
github.log.warn(`len(api_token): ${api_token.length}`);
// mask the newly minted API token, so that we don't accidentally leak it
core.setSecret(api_token)