Skip to content

Commit ad099a5

Browse files
authored
chore: switch npm publish auth from token to oidc (#838)
* chore: use oidc in npm publish instead of tokens * chore: update node
1 parent 49c06dc commit ad099a5

File tree

1 file changed

+10
-18
lines changed

1 file changed

+10
-18
lines changed

.github/workflows/publish-typescript-sdk.yml

Lines changed: 10 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ on:
99

1010
jobs:
1111
publish-gateway-sdk-npmjs:
12-
runs-on: ubuntu-22.04
12+
runs-on: ubuntu-latest
1313
defaults:
1414
run:
1515
working-directory: ./sdk/typescript
@@ -18,22 +18,16 @@ jobs:
1818
contents: read
1919
steps:
2020
- uses: RDXWorks-actions/checkout@main
21-
- uses: ./.github/actions/fetch-secrets
22-
with:
23-
role_name: "arn:aws:iam::308190735829:role/gh-babylon-gateway-secrets-read-access"
24-
app_name: "babylon-gateway"
25-
step_name: "publish-gateway-sdk-npmjs"
26-
secret_prefix: "NPM"
27-
secret_name: "github-actions/radixdlt/babylon-gateway/npm-publishing-secret"
28-
parse_json: true
21+
2922
- name: Use Node.js
3023
uses: RDXWorks-actions/setup-node@main
3124
with:
32-
node-version: "18.x"
25+
node-version: "20.x"
3326
registry-url: "https://registry.npmjs.org"
34-
env:
35-
NODE_AUTH_TOKEN: ${{ env.NPM_TOKEN }}
36-
- run: cat $NPM_CONFIG_USERCONFIG
27+
28+
- name: Upgrade npm
29+
run: npm i -g npm@^11.5.1
30+
3731
- name: Build alphanet-gateway-sdk
3832
env:
3933
VITE_SDK_VERSION: ${{ github.event.inputs.package_version_number || steps.setup_tags.outputs.version-tag }}
@@ -56,8 +50,6 @@ jobs:
5650
field: version
5751
value: ${{ github.event.inputs.package_version_number || steps.setup_tags.outputs.version-tag }}
5852

59-
- run: |
60-
npm config set access public
61-
npm publish
62-
env:
63-
NODE_AUTH_TOKEN: ${{ env.NPM_TOKEN }}
53+
- name: Publish
54+
run: env -u NODE_AUTH_TOKEN -u NPM_CONFIG_USERCONFIG npm publish --access public
55+

0 commit comments

Comments
 (0)