diff --git a/.github/workflows/js_rc.yml b/.github/workflows/js_rc.yml new file mode 100644 index 000000000..f6ab6aefd --- /dev/null +++ b/.github/workflows/js_rc.yml @@ -0,0 +1,55 @@ +name: JS SDK Release Candidate + +on: + pull_request: + +permissions: + contents: write + +jobs: + release: + name: Release Candidate + if: ${{ contains( github.event.pull_request.labels.*.name, 'rc') }} + runs-on: ubuntu-latest + defaults: + run: + working-directory: packages/js-sdk + + steps: + - name: Checkout Repo + uses: actions/checkout@v4 + with: + ref: ${{ github.head_ref }} + + - uses: pnpm/action-setup@v3 + + - name: Setup Node.js 20 + uses: actions/setup-node@v4 + with: + node-version: 20 + registry-url: 'https://registry.npmjs.org' + cache: pnpm + + - name: Configure pnpm + run: | + pnpm config set auto-install-peers true + pnpm config set exclude-links-from-lockfile true + + - name: Install dependencies + run: pnpm install --frozen-lockfile + + - name: Release Candidate + run: | + npm version prerelease --preid=${{ github.head_ref }} + npm publish --tag rc + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} + + - name: Commit new versions + run: | + git config user.name "github-actions[bot]" + git config user.email "github-actions[bot]@users.noreply.github.com" + git commit -am "[skip ci] Release new versions" || exit 0 + git push + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file diff --git a/packages/js-sdk/package.json b/packages/js-sdk/package.json index defb9ba20..28750ee64 100644 --- a/packages/js-sdk/package.json +++ b/packages/js-sdk/package.json @@ -1,6 +1,6 @@ { "name": "e2b", - "version": "0.12.1", + "version": "0.12.2-stateless-sdk.0", "description": "E2B SDK that give agents cloud environments", "homepage": "https://e2b.dev", "license": "MIT",