NPM publish using OIDC on github actions
permissions:
contents: write
id-token: writejobs:
npm-publish:
runs-on: ubuntu-latest
permissions:
contents: write
id-token: write
steps:
- uses: actions/checkout@v6
- uses: actions/setup-node@v6
with:
node-version: 24
registry-url: 'https://registry.npmjs.org'
# npm@v11.5.0+ is required for OIDC support
# node@v22.0.0+
# - name: Upgrade npm for OIDC support
# run: npm install -g npm@latest
# node@v24.0.0+
# https://github.com/orgs/community/discussions/176761
# https://github.com/actions/setup-node/issues/1440#issuecomment-3571890875
- run: NODE_AUTH_TOKEN="" npm publish --access public --provenance
name: 📦 hotkeys-js to NPM
continue-on-error: true
@pcfreak30 Are you referring to the need to keep the repository name in npm consistent with the GitHub repository name? And also setting the
repositoryin the project'spackage.jsonto match the name in both GitHub and npm configurations?