mirror of
https://github.com/resend/react-email.git
synced 2026-09-14 14:18:02 +08:00
47 lines
2.0 KiB
YAML
47 lines
2.0 KiB
YAML
name: Preview Release
|
|
on:
|
|
pull_request:
|
|
permissions:
|
|
contents: read
|
|
pull-requests: write
|
|
concurrency: ${{ github.workflow }}-${{ github.ref }}
|
|
jobs:
|
|
preview-release:
|
|
# Build secrets: same-repo PRs only; fork PRs evaluate to empty (explicit for review).
|
|
timeout-minutes: 45
|
|
runs-on: depot-ubuntu-22.04-8
|
|
permissions:
|
|
contents: write
|
|
pull-requests: write
|
|
container:
|
|
image: node:24
|
|
steps:
|
|
- name: Checkout Repo
|
|
uses: actions/checkout@0c366fd6a839edf440554fa01a7085ccba70ac98
|
|
with:
|
|
fetch-depth: 2
|
|
- run: git config --global --add safe.directory $GITHUB_WORKSPACE
|
|
- name: pnpm setup
|
|
uses: pnpm/action-setup@738f428026a1f5a72398de22aeed83d859c4a660
|
|
- name: Install packages
|
|
run: pnpm install --frozen-lockfile --prefer-offline
|
|
- name: Find changed packages
|
|
id: changed_packages
|
|
uses: tj-actions/changed-files@3c4bc6fa0ca4718d438e0a4bd3ea81fbb0e6e2be
|
|
with:
|
|
files: packages/**
|
|
dir_names: true
|
|
dir_names_max_depth: 2
|
|
- name: Run Build
|
|
if: steps.changed_packages.outputs.all_changed_and_modified_files != ''
|
|
run: pnpm build
|
|
env:
|
|
SPAM_ASSASSIN_HOST: ${{ github.event.pull_request.head.repo.full_name == github.repository && secrets.SPAM_ASSASSIN_HOST || '' }}
|
|
SPAM_ASSASSIN_PORT: ${{ github.event.pull_request.head.repo.full_name == github.repository && secrets.SPAM_ASSASSIN_PORT || '' }}
|
|
TURBO_TOKEN: ${{ github.event.pull_request.head.repo.full_name == github.repository && secrets.TURBO_TOKEN || '' }}
|
|
TURBO_TEAM: ${{ github.event.pull_request.head.repo.full_name == github.repository && secrets.TURBO_TEAM || '' }}
|
|
REDIS_URL: redis://localhost:6379
|
|
- name: Publish changed packages to pkg.pr.new
|
|
if: steps.changed_packages.outputs.all_changed_and_modified_files != ''
|
|
run: pnpm pkg-pr-new publish ${{ steps.changed_packages.outputs.all_changed_and_modified_files }} --pnpm
|