Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
49 changes: 49 additions & 0 deletions .github/workflows/preview.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
# https://github.com/stackblitz-labs/pkg.pr.new
name: Preview Release

on:
pull_request:
types: [closed]
workflow_dispatch:

permissions:
contents: read

jobs:
preview:
if: github.repository == 'web-infra-dev/rslib' && github.event.pull_request.merged == true
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 1

- name: Install pnpm
run: |
npm install -g corepack@latest --force
corepack enable

- uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2
id: changes
with:
filters: |
changed:
- "packages/**"
- "pnpm-lock.yaml"

- name: Setup Node.js
if: steps.changes.outputs.changed == 'true'
uses: actions/setup-node@v4
with:
node-version: 22
cache: 'pnpm'

- name: Install Dependencies
if: steps.changes.outputs.changed == 'true'
run: pnpm install

- name: Publish Preview
if: steps.changes.outputs.changed == 'true'
run: pnpx pkg-pr-new publish --compact --pnpm
Loading