Skip to content

fix: ci npm publish #405

fix: ci npm publish

fix: ci npm publish #405

Workflow file for this run

name: Publish package to npm
on:
workflow_dispatch:
push:
branches:
- 'main'
permissions:
contents: write # to be able to publish a GitHub release
issues: write # to be able to comment on released issues
pull-requests: write # to be able to comment on released pull requests
id-token: write # to enable use of OIDC for trusted publishing and npm provenance
jobs:
publish:
runs-on: ubuntu-latest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- name: Checkout
uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '20'
registry-url: 'https://registry.npmjs.org/'
- name: Install
run: yarn install --frozen-lockfile
- name: Build
run: yarn build
- name: Release
run: yarn release
- name: Configure npm for OIDC
run: npm install -g npm@11.6.1
- name: Publish to npm with OIDC
run: npm publish