Skip to content

Commit

Permalink
chore(ci): Add CLI deployment script
Browse files Browse the repository at this point in the history
  • Loading branch information
rajdip-b committed Jan 8, 2025
1 parent 6a009eb commit 51de9d1
Show file tree
Hide file tree
Showing 8 changed files with 548 additions and 97 deletions.
8 changes: 8 additions & 0 deletions .changeset/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Changesets

Hello and welcome! This folder has been automatically generated by `@changesets/cli`, a build tool that works
with multi-package repos, or single-package repos to help you version and publish your code. You can
find the full documentation for it [in our repository](https://github.com/changesets/changesets)

We have a quick list of common questions to get you started engaging with this project in
[our documentation](https://github.com/changesets/changesets/blob/main/docs/common-questions.md)
11 changes: 11 additions & 0 deletions .changeset/config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"$schema": "https://unpkg.com/@changesets/[email protected]/schema.json",
"changelog": "@changesets/cli/changelog",
"commit": true,
"fixed": [],
"linked": [],
"access": "public",
"baseBranch": "develop",
"updateInternalDependencies": "patch",
"ignore": []
}
31 changes: 31 additions & 0 deletions .github/workflows/deploy-cli.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Deploy CLI
on:
workflow_dispatch:
push:
branches:
- main
- develop
paths: ['apps/cli/**', '.github/workflows/deploy-cli.yml', 'package.json']

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '20.x'
registry-url: 'https://registry.npmjs.org'
cache: 'pnpm'
- name: Install pnpm
run: npm i -g pnpm
- name: Install dependencies
run: pnpm install
- name: Build
run: pnpm build:cli
- name: Authenticate with npm
run: echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > ~/.npmrc
- run: npm ci
- run: cd apps/cli && npm publish --provenance --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
4 changes: 3 additions & 1 deletion .npmrc
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
strict-peer-dependencies=false
auto-install-peers=true
ignore-workspace-root-check=true
ignore-workspace-root-check=true
git-checks=false
registry=https://registry.npmjs.org
7 changes: 7 additions & 0 deletions apps/cli/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# cli

## 2.0.0

### Major Changes

- Made things functional
5 changes: 3 additions & 2 deletions apps/cli/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "cli",
"version": "1.0.0",
"version": "2.0.0",
"description": "CLI for keyshade",
"main": "dist/src/index.js",
"private": false,
Expand All @@ -9,7 +9,8 @@
"build": "tsc && tsc-alias",
"start": "node dist/src/index.js",
"dev": "pnpm build && node dist/src/index.js",
"lint": "eslint \"src/**/*.ts\" --fix"
"lint": "eslint \"src/**/*.ts\" --fix",
"publish": "pnpm build && pnpm publish --access public --provenance"
},
"keywords": [],
"author": "",
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,7 @@
"turbo": "^2.3.3"
},
"dependencies": {
"@changesets/cli": "^2.27.11",
"@keyshade/api-client": "workspace:*",
"@keyshade/schema": "workspace:*",
"@semantic-release/changelog": "^6.0.3",
Expand Down
578 changes: 484 additions & 94 deletions pnpm-lock.yaml

Large diffs are not rendered by default.

0 comments on commit 51de9d1

Please sign in to comment.