Skip to content

Commit 9a37246

Browse files
committed
chore: publish to npm via OIDC
1 parent cb63625 commit 9a37246

1 file changed

Lines changed: 3 additions & 4 deletions

File tree

.github/workflows/build.yml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@ jobs:
1414
name: "Build with Emsdk:${{ matrix.emsdk }}"
1515
runs-on: ubuntu-latest
1616
if: github.event_name == 'schedule' || !contains(github.event.head_commit.message, '[ci skip]')
17+
permissions:
18+
id-token: write
19+
contents: write
1720
env:
1821
CMAKE_EXE_LINKER_FLAGS: "-sMAXIMUM_MEMORY=4294967296 -sSINGLE_FILE"
1922
strategy:
@@ -137,11 +140,7 @@ jobs:
137140
git push -u origin "v$VERSION"
138141
- name: "Publish to npm"
139142
if: github.event_name == 'schedule' && matrix.emsdk == 'tot'
140-
env:
141-
NPM_REGISTRY: "registry.npmjs.org"
142-
NPM_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
143143
run: |
144-
npm config set "//${NPM_REGISTRY}/:_authToken=${NPM_AUTH_TOKEN}"
145144
if [ $RELEASE ]; then
146145
echo "Publishing release ..."
147146
npm publish

0 commit comments

Comments
 (0)