Skip to content

Updated publish.yml file #10

Updated publish.yml file

Updated publish.yml file #10

Workflow file for this run

name: Publish to npm
on:
push:
branches:
- main
# OIDC Permissions for Trusted Publishing
permissions:
id-token: write
contents: read
jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: "20"
registry-url: "https://registry.npmjs.org"
# Ensure npm 11.5.1 or later is installed
- name: Update npm
run: npm install -g npm@latest
- run: npm ci
- run: npm run build --if-present
- run: npm test
- run: npm publish