publish-js.yml 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738
  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@v4
  12. - uses: actions-rust-lang/setup-rust-toolchain@v1
  13. - uses: actions/setup-node@v4
  14. with:
  15. node-version-file: "package.json"
  16. # Libusb is a build requirement for the node-hid package and so pnpm
  17. # install will fail if this isn't in the build environment and if a
  18. # precompiled binary isn't found.
  19. - name: Install libusb
  20. run: sudo apt-get update && sudo apt-get install -y libusb-1.0-0-dev libudev-dev
  21. # Install Foundry for Ethereum contract builds
  22. - name: Install Foundry
  23. uses: foundry-rs/foundry-toolchain@v1
  24. with:
  25. version: v0.3.0
  26. - uses: pnpm/action-setup@v4
  27. name: Install pnpm
  28. with:
  29. run_install: true
  30. - name: Install Forge dependencies
  31. run: cd target_chains/ethereum/contracts && pnpm run install-forge-deps
  32. - name: Set publishing config
  33. run: pnpm config set '//registry.npmjs.org/:_authToken' "${NODE_AUTH_TOKEN}"
  34. env:
  35. NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
  36. - run: pnpm run turbo build
  37. - run: pnpm publish -r --no-git-checks