Skip to content

Commit 90a0030

Browse files
thisisamir98istankovic
authored andcommitted
chore: ci: move to npm Trusted Publishers (OIDC) [WPB-21110]
(cherry picked from commit 0f90613)
1 parent a10c0af commit 90a0030

File tree

2 files changed

+9
-11
lines changed

2 files changed

+9
-11
lines changed

.github/workflows/pipeline.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -294,5 +294,5 @@ jobs:
294294
publish-web:
295295
needs: prepare-publish
296296
uses: ./.github/workflows/publish-wasm.yml
297-
secrets:
298-
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
297+
permissions:
298+
id-token: write

.github/workflows/publish-wasm.yml

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,6 @@ concurrency:
55

66
on:
77
workflow_call:
8-
secrets:
9-
NPM_TOKEN:
10-
required: true
118

129
env:
1310
RELEASE: 1
@@ -23,6 +20,9 @@ jobs:
2320
with:
2421
bun-version: latest
2522

23+
- name: Setup Node for npm publish
24+
uses: actions/setup-node@v6
25+
2626
- name: download ts artifacts
2727
uses: ./.github/actions/make/web/ts
2828
with:
@@ -38,15 +38,13 @@ jobs:
3838
- name: upload artifacts
3939
uses: softprops/action-gh-release@v2
4040
with:
41-
files: "${{ steps.package.outputs.path }}"
42-
fail_on_unmatched_files: true
41+
files: "${{ steps.package.outputs.path }}"
42+
fail_on_unmatched_files: true
4343

44-
- name: publishes package to npm
45-
env:
46-
NPM_CONFIG_TOKEN: "${{ secrets.NPM_TOKEN }}"
44+
- name: publish package to npm (Trusted Publishers)
4745
run: |
4846
cd crypto-ffi/bindings/js
49-
bun publish ./"${{ steps.package.outputs.filename }}"
47+
npm publish "./${{ steps.package.outputs.filename }}"
5048
5149
- name: delete package from gh release
5250
run: gh release delete-asset $GITHUB_REF_NAME "${{ steps.package.outputs.filename }}" --yes

0 commit comments

Comments
 (0)