# This workflow will run tests using node and then publish a package to GitHub Packages when a release is created
# For more information see: https://docs.github.com/zh/actions/publishing-packages/publishing-nodejs-packages
name: npm-publish
on:
  push:
    branches:
      - master # Change this to your default branch
jobs:
  npm-publish:
    name: npm-publish
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: actions/setup-node@v3
        with:
          node-version: '20.x'
          registry-url: 'https://registry.npmjs.org/'
      - run: npm publish
        env: # More info about the environment variables in the README
          NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}} # You need to set this in your repo settings
  
