From c7f05a045a9285d942378181e67885b48db1ef66 Mon Sep 17 00:00:00 2001 From: rajdip-b Date: Wed, 8 Jan 2025 21:05:46 +0530 Subject: [PATCH] chore(ci): Minor fixes --- .github/workflows/deploy-cli.yml | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/.github/workflows/deploy-cli.yml b/.github/workflows/deploy-cli.yml index 96f843dd..9643d9a1 100644 --- a/.github/workflows/deploy-cli.yml +++ b/.github/workflows/deploy-cli.yml @@ -8,22 +8,35 @@ on: paths: ['apps/cli/**', '.github/workflows/deploy-cli.yml', 'package.json'] jobs: - build: + publish: + name: Publish CLI runs-on: ubuntu-latest + + permissions: + contents: read + id-token: write + steps: - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 with: node-version: '20.x' registry-url: 'https://registry.npmjs.org' + - 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: cd apps/cli && npm publish --provenance --access public + + - name: Publish + run: cd apps/cli && npm publish --provenance --access public env: NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}