Skip to content

Commit

Permalink
feat: add ci/cd workflow for js sdk (#319)
Browse files Browse the repository at this point in the history
  • Loading branch information
Praveen Yadav authored Sep 1, 2023
1 parent da537e2 commit f697bed
Show file tree
Hide file tree
Showing 3 changed files with 51 additions and 7 deletions.
48 changes: 48 additions & 0 deletions .github/workflows/js-sdk.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: Release

on:
push:
branches:
- main
paths:
- '.changeset/**'
- '.github/workflows/js-sdk.yml'
workflow_dispatch:

concurrency: ${{ github.workflow }}-${{ github.ref }}

jobs:
release:
name: Release
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- name: Checkout Repo
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Setup pnpm 8
uses: pnpm/action-setup@v2
with:
version: 8.6.9

- name: Setup Node.js 18.x
uses: actions/setup-node@v2
with:
node-version: 18.x

- name: Install Dependencies
working-directory: ./sdks/js
run: pnpm i

- name: Create Release Pull Request or Publish to npm
id: changesets
uses: changesets/action@v1
working-directory: ./sdks/js
with:
version: pnpm ci:version
publish: pnpm ci:release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
5 changes: 0 additions & 5 deletions sdks/js/.changeset/calm-kids-compete.md

This file was deleted.

5 changes: 3 additions & 2 deletions sdks/js/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,10 @@
"lint": "turbo run lint",
"clean": "turbo run clean",
"changeset": "changeset",
"version-packages": "changeset version",
"prettier-check": "prettier --check \"**/*.{js,ts,tsx,md,mdx}\"",
"prettier-fix": "prettier --write \"**/*.{js,ts,tsx,md,mdx}\""
"prettier-fix": "prettier --write \"**/*.{js,ts,tsx,md,mdx}\"",
"ci:version": "changeset version",
"ci:release": "turbo build --filter=@raystack/frontier... && changeset publish"
},
"devDependencies": {
"@turbo/gen": "^1.9.7",
Expand Down

0 comments on commit f697bed

Please sign in to comment.