publish_to_npm.yml 611 B

123456789101112131415161718192021222324
  1. name: Publish Package to npmjs
  2. on:
  3. release:
  4. types: [published]
  5. workflow_dispatch:
  6. jobs:
  7. build:
  8. runs-on: ubuntu-latest
  9. permissions:
  10. contents: read
  11. id-token: write
  12. steps:
  13. - uses: actions/checkout@v4
  14. # Setup .npmrc file to publish to npm
  15. - uses: actions/setup-node@v4
  16. with:
  17. node-version: '22.x'
  18. registry-url: 'https://registry.npmjs.org'
  19. - run: npm ci
  20. - run: npm run build
  21. - run: lerna publish from-package --yes
  22. env:
  23. NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
  24. NPM_CONFIG_PROVENANCE: true