diff --git a/.github/workflows/release_js.yml b/.github/workflows/release_js.yml new file mode 100644 index 000000000..3dc9e2829 --- /dev/null +++ b/.github/workflows/release_js.yml @@ -0,0 +1,33 @@ +name: JS Release + +on: + workflow_dispatch: + +jobs: + publish: + # Disallow publishing from branches that aren't `main`. + if: github.ref == 'refs/heads/main' + runs-on: ubuntu-latest + strategy: + matrix: + working-directory: + - "libs/sdk-js" + + steps: + - uses: actions/checkout@v4 + # JS Build + - name: Use Node.js + uses: actions/setup-node@v3 + with: + node-version: "20" + cache: "yarn" + cache-dependency-path: ${{ matrix.working-directory }}/yarn.lock + + - name: Install dependencies + run: yarn install + - name: Build + run: yarn build + - name: Publish package to NPM + run: | + echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > .npmrc + npm publish \ No newline at end of file