publish-js.yml 1010 B

1234567891011121314151617181920212223242526272829303132
  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. - name: Install libusb
  12. run: sudo apt install -y libusb-1.0-0-dev
  13. - uses: actions/checkout@v2
  14. - uses: actions/setup-node@v4
  15. with:
  16. node-version-file: "package.json"
  17. # Libusb is a build requirement for the node-hid package and so pnpm
  18. # install will fail if this isn't in the build environment and if a
  19. # precompiled binary isn't found.
  20. - name: Install libusb
  21. run: sudo apt install -y libusb-1.0-0-dev libudev-dev
  22. - uses: pnpm/action-setup@v4
  23. name: Install pnpm
  24. with:
  25. run_install: true
  26. - name: Set publishing config
  27. run: pnpm config set '//registry.npmjs.org/:_authToken' "${NODE_AUTH_TOKEN}"
  28. env:
  29. NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
  30. - run: pnpm build:ci
  31. - run: pnpm run publish