Skip to content

Commit

Permalink
ci: add pkg.pr.new (#987)
Browse files Browse the repository at this point in the history
copied from vite repository
  • Loading branch information
sadeghbarati committed Jan 4, 2025
1 parent 1195a83 commit dfdc153
Showing 1 changed file with 42 additions and 0 deletions.
42 changes: 42 additions & 0 deletions .github/workflows/pkg.pr.new.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Preview CLI release

permissions:
pull-requests: write

on:
push:
branches:
- dev
path-ignore:
- 'test/**'
- '*.md'
pull_request:
types: [opened, synchronize, labeled]
paths:
- packages/cli/**
path-ignore:
- 'test/**'
- '*.md'

jobs:
preview:
if: >
github.repository == 'unovue/shadcn-vue' &&
(github.event_name == 'push' ||
(github.event_name == 'pull_request' && contains(github.event.pull_request.labels.*.name, 'trigger: preview')))
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Install pnpm
uses: pnpm/[email protected]

- name: Install dependencies
run: pnpm install

- name: Build
working-directory: ./packages/cli
run: pnpm build

- run: pnpm dlx pkg-pr-new publish --compact --pnpm ./packages/cli

0 comments on commit dfdc153

Please sign in to comment.