Skip to content

build: create preview releases on pr's with preview-release labels #33

build: create preview releases on pr's with preview-release labels

build: create preview releases on pr's with preview-release labels #33

name: Preview Release
on:
push:
branches:
- main
pull_request:
types:
- labeled
jobs:
build:
if: github.ref == 'refs/heads/main' || github.event.pull_request.labels.*.name contains 'preview-release'

Check failure on line 13 in .github/workflows/preview-release.yml

View workflow run for this annotation

GitHub Actions / Preview Release

Invalid workflow file

The workflow is not valid. .github/workflows/preview-release.yml (Line: 13, Col: 9): Unexpected symbol: 'contains'. Located at position 76 within expression: github.ref == 'refs/heads/main' || github.event.pull_request.labels.*.name contains 'preview-release'
name: Create Preview Release
timeout-minutes: 15
runs-on: ubuntu-latest
env:
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}
TURBO_TEAM: ${{ vars.TURBO_TEAM }}
steps:
- name: Check out code
uses: actions/checkout@v4
with:
fetch-depth: 2
- uses: pnpm/action-setup@v3
with:
version: 8
- name: Setup Node.js environment
uses: actions/setup-node@v4
with:
node-version: 20
cache: 'pnpm'
- name: Install dependencies
run: pnpm install
- name: Build cli
run: pnpm build --filter=@content-collections/cli
- name: Install cli binary
run: pnpm install
- name: Build
run: pnpm build
- name: Deploy preview release
run: pnpx pkg-pr-new publish './packages/*'