Skip to content

fix publish: use OIDC trusted publishing without token per npm docs #8

fix publish: use OIDC trusted publishing without token per npm docs

fix publish: use OIDC trusted publishing without token per npm docs #8

Workflow file for this run

name: Publish to npm
on:
push:
branches: [main]
concurrency:
group: publish
cancel-in-progress: true
jobs:
publish:
if: "contains(github.event.head_commit.message, '[skip ci]') == false"
runs-on: ubuntu-latest
permissions:
contents: write
id-token: write
steps:
- name: Checkout
uses: actions/checkout@v4
with:
token: "${{ secrets.GITHUB_TOKEN }}"
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: "20"
registry-url: "https://registry.npmjs.org"
- name: Configure git
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
- name: Bump patch version
run: 'npm version patch -m "bump to %s [skip ci]"'
- name: Push version bump
run: git push
- name: Publish to npm
run: npm publish --access public