Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 6 additions & 12 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,32 +4,26 @@ on: [pull_request]

jobs:
run-ci:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

name: Run Type Check & Linters
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Set up Node
uses: actions/setup-node@v2
uses: actions/setup-node@v4
with:
node-version: 14
node-version: 20
cache: npm

- name: Install Dependencies
uses: borales/actions-yarn@v2.1.0
with:
cmd: install
run: npm ci

- name: Build Project
uses: borales/actions-yarn@v2.1.0
with:
cmd: build
run: npm run build

- name: Check commits messages
uses: wagoid/commitlint-github-action@v5
42 changes: 42 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Publish to npm

# Publishes @keploy/sdk when a GitHub release is published.
# The release tag (e.g. v2.0.11) sets the package version, so the version on npm
# always matches a tagged commit on main.
on:
release:
types: [published]

permissions:
contents: read
id-token: write

jobs:
build-and-publish:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 20
cache: npm
# Without registry-url, setup-node writes no npm auth config and NODE_AUTH_TOKEN is ignored.
registry-url: https://registry.npmjs.org

- name: Set version from the release tag
run: npm version "${GITHUB_REF_NAME#v}" --no-git-tag-version --allow-same-version

- name: Install dependencies
run: npm ci

- name: Build project
run: npm run build

- name: Publish to npm
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
run: npm publish --provenance --access public
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@keploy/sdk",
"version": "2.0.2",
"version": "2.0.10",
"description": "This is the client SDK for the [Keploy](https://github.com/keploy/keploy) testing platform. With the TypeScript SDK, you can test both your existing unit test cases in Jest and create new end-to-end test cases for your applications.",
"main": "dist/keployCli.js",
"types": "dist/keployCli.d.ts",
Expand Down