Skip to content

Commit 8c2d215

Browse files
authored
Use NPM_TOKEN instead OIDC for publishing
1 parent df44f45 commit 8c2d215

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

.github/workflows/build.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,6 @@ jobs:
1717
name: "Build with Emsdk:${{ matrix.emsdk }}"
1818
runs-on: ubuntu-latest
1919
if: github.event_name == 'schedule' || !contains(github.event.head_commit.message, '[ci skip]')
20-
permissions:
21-
id-token: write
22-
contents: write
2320
env:
2421
CMAKE_EXE_LINKER_FLAGS: "-sMAXIMUM_MEMORY=4294967296 -sSINGLE_FILE"
2522
strategy:
@@ -30,6 +27,7 @@ jobs:
3027
- uses: actions/setup-node@v6
3128
with:
3229
node-version: '22'
30+
registry-url: 'https://registry.npmjs.org'
3331
- name: "Set up Emsdk"
3432
run: |
3533
mkdir $HOME/emsdk
@@ -139,7 +137,11 @@ jobs:
139137
git push -u origin "v$VERSION"
140138
- name: "Publish to npm"
141139
if: github.event_name == 'schedule' && matrix.emsdk == 'tot'
140+
env:
141+
NPM_REGISTRY: "registry.npmjs.org"
142+
NPM_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
142143
run: |
144+
npm config set "//${NPM_REGISTRY}/:_authToken=${NPM_AUTH_TOKEN}"
143145
if [ $RELEASE ]; then
144146
echo "Publishing release ..."
145147
npm publish

0 commit comments

Comments
 (0)