From 104301a104e5fc744e06b72ccc58ae1c09340a9b Mon Sep 17 00:00:00 2001 From: Eric Allam Date: Mon, 12 Aug 2024 13:33:37 +0100 Subject: [PATCH] Adding package preview release --- .github/workflows/pr_checks.yml | 48 ++++++++++++++++++++++++++++----- 1 file changed, 41 insertions(+), 7 deletions(-) diff --git a/.github/workflows/pr_checks.yml b/.github/workflows/pr_checks.yml index 0bf7140e7..fdff79937 100644 --- a/.github/workflows/pr_checks.yml +++ b/.github/workflows/pr_checks.yml @@ -2,13 +2,7 @@ name: 🤖 PR Checks on: pull_request: - branches: - - main - paths-ignore: - - "**.md" - - "**.mdx" - - ".github/CODEOWNERS" - - ".github/ISSUE_TEMPLATE/**" + types: [opened, synchronize, reopened] concurrency: group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} @@ -27,6 +21,46 @@ jobs: uses: ./.github/workflows/unit-tests.yml secrets: inherit + preview-release: + name: Preview Release + needs: [typescript, units] + if: | + github.repository == 'triggerdotdev/trigger.dev' + runs-on: buildjet-8vcpu-ubuntu-2204 + steps: + - name: ⬇️ Checkout repo + uses: actions/checkout@v3 + with: + fetch-depth: 0 + + - name: ⎔ Setup pnpm + uses: pnpm/action-setup@v4 + with: + version: 8.15.5 + + - name: ⎔ Setup node + uses: buildjet/setup-node@v3 + with: + node-version: 20.11.1 + cache: "pnpm" + + - name: Install Protoc + uses: arduino/setup-protoc@v3 + with: + repo-token: ${{ secrets.GITHUB_TOKEN }} + + - name: 📥 Download deps + run: pnpm install --frozen-lockfile + + - name: 📀 Generate Code + run: pnpm run generate + + - name: 🏗️ Build + run: pnpm run build --filter "@trigger.dev/*" --filter "trigger.dev" + + - name: ⚡ publish preview release + run: npx pkg-pr-new publish --no-template --compact $(ls -d ./packages/*) + # e2e: # uses: ./.github/workflows/e2e.yml # with: