publish-js.yml 980 B

123456789101112131415161718192021222324252627282930
  1. name: Publish Pyth JS packages
  2. on:
  3. push:
  4. tags:
  5. - pyth-js-v*
  6. jobs:
  7. publish-js:
  8. name: Publish Javascript Packages to NPM
  9. runs-on: ubuntu-latest
  10. steps:
  11. - uses: actions/checkout@v2
  12. - uses: actions/setup-node@v4
  13. with:
  14. node-version-file: "package.json"
  15. # Libusb is a build requirement for the node-hid package and so pnpm
  16. # install will fail if this isn't in the build environment and if a
  17. # precompiled binary isn't found.
  18. - name: Install libusb
  19. run: sudo apt-get update && sudo apt-get install -y libusb-1.0-0-dev libudev-dev
  20. - uses: pnpm/action-setup@v4
  21. name: Install pnpm
  22. with:
  23. run_install: true
  24. - name: Set publishing config
  25. run: pnpm config set '//registry.npmjs.org/:_authToken' "${NODE_AUTH_TOKEN}"
  26. env:
  27. NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
  28. - run: pnpm run turbo build
  29. - run: pnpm publish -r --no-git-checks