ci: access pkg.pr.new
link with branch names
#13
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Preview CLI release | |
permissions: | |
pull-requests: write | |
on: | |
pull_request: | |
push: | |
types: [opened, synchronize, labeled] | |
tags: | |
- "!**" | |
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 --pnpm ./packages/cli |