Skip to content

Commit 3d43b9e

Browse files
committed
Fix github-script syntax in create-release.yml
1 parent a539ce7 commit 3d43b9e

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

.github/workflows/create-release.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,20 +41,20 @@ jobs:
4141
// retrieve the ambient OIDC token
4242
const oidc_request_token = process.env.ACTIONS_ID_TOKEN_REQUEST_TOKEN;
4343
const oidc_request_url = process.env.ACTIONS_ID_TOKEN_REQUEST_URL;
44-
const resp = await fetch(`${oidc_request_url}&audience=testpypi`, {
44+
const oidc_resp = await fetch(`${oidc_request_url}&audience=testpypi`, {
4545
headers: {Authorization: `bearer ${oidc_request_token}`},
4646
}
4747
);
48-
const oidc_token = (await response.json()).value;
48+
const oidc_token = (await oidc_resp.json()).value;
4949
5050
// exchange the OIDC token for an API token
51-
const resp = await fetch('https://pypi.org/_/oidc/github/mint-token', {
51+
const mint_resp = await fetch('https://pypi.org/_/oidc/github/mint-token', {
5252
method: 'post',
5353
body: '{"token": "oidc_token"}' ,
5454
headers: {'Content-Type': 'application/json'},
5555
}
5656
);
57-
const api_token = (await response.json()).token;
57+
const api_token = (await mint_resp.json()).token;
5858

5959
// mask the newly minted API token, so that we don't accidentally leak it
6060
core.setSecret(api_token)

0 commit comments

Comments
 (0)