Skip to content

Commit a539ce7

Browse files
committed
Add GitHub Actions environment; fix variable names
1 parent c161e9c commit a539ce7

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

.github/workflows/create-release.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ jobs:
1313
publish-pypi:
1414
runs-on: ubuntu-latest
1515
name: PyPI Release
16+
environment: release
1617
permissions:
1718
id-token: write # for PyPI trusted publishing
1819
steps:
@@ -38,10 +39,10 @@ jobs:
3839
with:
3940
script: |
4041
// retrieve the ambient OIDC token
41-
const oidc_token = process.env.ACTIONS_ID_TOKEN_REQUEST_TOKEN;
42-
const oidc_url = process.env.ACTIONS_ID_TOKEN_REQUEST_URL;
43-
const resp = await fetch(`${oidc_url}&audience=testpypi`, {
44-
headers: {Authorization: `bearer ${oidc_token}`},
42+
const oidc_request_token = process.env.ACTIONS_ID_TOKEN_REQUEST_TOKEN;
43+
const oidc_request_url = process.env.ACTIONS_ID_TOKEN_REQUEST_URL;
44+
const resp = await fetch(`${oidc_request_url}&audience=testpypi`, {
45+
headers: {Authorization: `bearer ${oidc_request_token}`},
4546
}
4647
);
4748
const oidc_token = (await response.json()).value;

0 commit comments

Comments
 (0)