npm-publish.yml 696 B

12345678910111213141516171819202122232425
  1. # This workflow will run tests using node and then publish a package to GitHub Packages when a release is created
  2. # For more information see: https://help.github.com/actions/language-and-framework-guides/publishing-nodejs-packages
  3. name: npm package
  4. on:
  5. release:
  6. types: [created]
  7. jobs:
  8. publish-npm:
  9. runs-on: ubuntu-latest
  10. steps:
  11. - uses: actions/checkout@v3
  12. - uses: actions/setup-node@v3
  13. with:
  14. node-version: 16
  15. registry-url: https://registry.npmjs.org/
  16. - run: npm install
  17. - run: npm ci
  18. - run: npm run build
  19. - run: npm run test
  20. - run: npm publish
  21. env:
  22. NODE_AUTH_TOKEN: ${{secrets.npm_token}}