Skip to content

Commit

Permalink
Add release candidate github action
Browse files Browse the repository at this point in the history
  • Loading branch information
jakubno committed Feb 16, 2024
1 parent 7f82e00 commit e022ce5
Show file tree
Hide file tree
Showing 2 changed files with 56 additions and 1 deletion.
55 changes: 55 additions & 0 deletions .github/workflows/js_rc.yml
Original file line number Diff line number Diff line change
@@ -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 }}
2 changes: 1 addition & 1 deletion packages/js-sdk/package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down

0 comments on commit e022ce5

Please sign in to comment.