diff --git a/.github/workflows/pr-checks.yaml b/.github/workflows/pr-checks.yaml index f5816c3a2d..ced4600ff2 100644 --- a/.github/workflows/pr-checks.yaml +++ b/.github/workflows/pr-checks.yaml @@ -9,6 +9,10 @@ on: permissions: contents: read +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + jobs: pr-checks: runs-on: ${{ matrix.os }} @@ -53,3 +57,35 @@ jobs: - name: Verify generated code can build run: vp run -F orval-tests build + + publish-preview: + needs: pr-checks + runs-on: ubuntu-latest + permissions: + contents: read + pull-requests: write + + steps: + - name: Checkout repository + uses: actions/checkout@v7 + with: + ref: ${{ github.event.pull_request.head.sha }} + persist-credentials: false + + - name: Setup Vite+ + uses: voidzero-dev/setup-vp@v1 + with: + node-version: 24 + cache: true + + - name: Setup Bun + uses: oven-sh/setup-bun@v2 + + - name: Install dependencies + run: vp install --frozen-lockfile + + - name: Build packages + run: vp run -w build:release + + - name: Publish preview packages + run: bun run pkg-pr-new publish './packages/*' --commentWithSha --packageManager=bun diff --git a/README.md b/README.md index fc50d74412..3a58d18c85 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,7 @@ ![NPM Downloads](https://img.shields.io/npm/dm/orval?color=purple) [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT) [![Gurubase](https://img.shields.io/badge/Gurubase-Ask%20Orval%20Guru-006BFF)](https://gurubase.io/g/orval) +[![pkg.pr.new](https://pkg.pr.new/badge/orval-labs/orval)](https://pkg.pr.new/~/orval-labs/orval)

orval - Restfull Client Generator diff --git a/bun.lock b/bun.lock index 4749268e7d..ff2cf4fd94 100644 --- a/bun.lock +++ b/bun.lock @@ -9,6 +9,7 @@ "@commitlint/config-conventional": "^21.0.1", "@socketsecurity/bun-security-scanner": "^1.1.2", "@types/node": "catalog:", + "pkg-pr-new": "^0.0.75", "rimraf": "catalog:", "typescript": "catalog:", "vite-plus": "catalog:", @@ -3434,6 +3435,8 @@ "pkce-challenge": ["pkce-challenge@5.0.1", "", {}, "sha512-wQ0b/W4Fr01qtpHlqSqspcj3EhBvimsdh0KlHhH8HRZnMsEa0ea2fTULOXOS9ccQr3om+GcGRk4e+isrZWV8qQ=="], + "pkg-pr-new": ["pkg-pr-new@0.0.75", "", { "bin": { "pkg-pr-new": "bin/cli.js" } }, "sha512-u9mdErTewKSMsr+ceCt8VcNuNP0ro5AXiPXhUVApuEyqr2Zlvt+DdCFBcm+yGWN8mhOdZJ27meIDbnoZgfzpOw=="], + "pkg-types": ["pkg-types@2.3.0", "", { "dependencies": { "confbox": "^0.2.2", "exsolve": "^1.0.7", "pathe": "^2.0.3" } }, "sha512-SIqCzDRg0s9npO5XQ3tNZioRY1uK06lA41ynBC1YmFTmnY6FjUjVt6s4LoADmwoig1qqD0oK8h1p/8mlMx8Oig=="], "plur": ["plur@4.0.0", "", { "dependencies": { "irregular-plurals": "^3.2.0" } }, "sha512-4UGewrYgqDFw9vV6zNV+ADmPAUAfJPKtGvb/VdpQAx25X5f3xXdGdyOEVFwkl8Hl/tl7+xbeHqSEM+D5/TirUg=="], diff --git a/package.json b/package.json index 168a49f21c..f26a3af92d 100644 --- a/package.json +++ b/package.json @@ -37,6 +37,7 @@ "@commitlint/config-conventional": "^21.0.1", "@socketsecurity/bun-security-scanner": "^1.1.2", "@types/node": "catalog:", + "pkg-pr-new": "^0.0.75", "rimraf": "catalog:", "typescript": "catalog:", "vite-plus": "catalog:",