Skip to content

Commit

Permalink
Add release pipeline
Browse files Browse the repository at this point in the history
  • Loading branch information
jakubno committed Mar 6, 2024
1 parent 0fc18ea commit 8766860
Showing 1 changed file with 55 additions and 0 deletions.
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, 'js-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 }}

0 comments on commit 8766860

Please sign in to comment.