Skip to content

Commit b8d1ba8

Browse files
committed
Fix publish CI
1 parent fd193c9 commit b8d1ba8

1 file changed

Lines changed: 5 additions & 6 deletions

File tree

.github/workflows/sdk_publish.yaml

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ on:
1515
jobs:
1616
mint-token:
1717
runs-on: ubuntu-latest
18+
outputs:
19+
api-token: ${{ steps.mint-token.outputs.api-token }}
1820
steps:
1921
- name: Mint API token
2022
id: mint-token
@@ -28,15 +30,12 @@ jobs:
2830
resp=$(curl -X POST https://pypi.org/_/oidc/mint-token -d "{\"token\": \"${oidc_token}\"}")
2931
api_token=$(jq -r '.token' <<< "${resp}")
3032
31-
# mask the newly minted API token, so that we don't accidentally leak it
32-
echo "::add-mask::${api_token}"
33-
34-
# set the environment variable for the job
35-
echo "API_TOKEN=${api_token}" >> $GITHUB_ENV
33+
# see the next step in the workflow for an example of using this step output
34+
echo "api-token=${api_token}" >> "${GITHUB_OUTPUT}"
3635
publish:
3736
needs: mint-token
3837
uses: speakeasy-api/sdk-generation-action/.github/workflows/sdk-publish.yaml@v15
3938
secrets:
4039
github_access_token: ${{ secrets.GITHUB_TOKEN }}
41-
pypi_token: ${{ github.env.API_TOKEN }}
40+
pypi_token: ${{ needs.mint-token.outputs.api-token }}
4241
speakeasy_api_key: ${{ secrets.SPEAKEASY_API_KEY }}

0 commit comments

Comments
 (0)