Skip to content

Commit

Permalink
build: Add a workflow to auto publish the CLI to npm
Browse files Browse the repository at this point in the history
  • Loading branch information
MohamedBassem committed May 5, 2024
1 parent 27f45d5 commit 78e20b9
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 0 deletions.
20 changes: 20 additions & 0 deletions .github/workflows/cli.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Publish CLI Package to npm
on:
push:
tags:
# This is a glob pattern not a regex
- 'cli/v[0-9]+.[0-9]+.[0-9]+'
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Setup
uses: ./tooling/github/setup

- run: pnpm publish --access public --no-git-checks
working-directory: apps/cli
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_ACCESS_TOKEN }}

1 change: 1 addition & 0 deletions tooling/github/setup/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ runs:
with:
node-version: 21
cache: "pnpm"
registry-url: https://registry.npmjs.org

- shell: bash
run: pnpm add -g turbo
Expand Down

0 comments on commit 78e20b9

Please sign in to comment.