Skip to content

Refine GitHub Actions workflow trigger conditions #32

Refine GitHub Actions workflow trigger conditions

Refine GitHub Actions workflow trigger conditions #32

Workflow file for this run

name: Publish
on:
push:
branches:
- main
paths-ignore:
- "**/*.!(ts|json|lock)"
- ".vscode/**"
jobs:
publish:
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write
steps:
- uses: actions/checkout@v4
- name: Publish package to JSR
run: npx jsr publish
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: "20.x"
registry-url: "https://registry.npmjs.org"
- name: Publish package to NPM
run: npm publish --provenance --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}