Skip to content

release-preview

release-preview #6

Workflow file for this run

name: release
on:
pull_request_review:
types: [submitted]
workflow_dispatch:
jobs:
check:
# Check the user approving this pull request.
# They must have the write access to the repo
# to trigger the preview publish.
if: github.event.review.state == 'approved'
runs-on: ubuntu-latest
steps:
- name: Check permissions
id: checkPermissions
uses: actions-cool/check-user-permission@v2
with:
username: github.triggering_actor
require: 'write'
- if: steps.checkPermissions.outputs.check-result == 'false'
run: exit 1
preview:
# The approving user must pass the permissions check
# to trigger the preview publish.
needs: check
runs-on: macos-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: 18
- name: Set up pnpm
uses: pnpm/action-setup@v4
with:
version: 8.15.6
- name: Install dependencies
run: pnpm install
- name: Install Playwright browsers
run: pnpm exec playwright install
- name: Lint
run: pnpm lint
- name: Build
run: pnpm build
- name: Tests
run: pnpm test
- name: Publish preview
run: pnpm dlx [email protected] publish --compact --pnpm --comment=update