Version Packages #2948
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Package preview | |
| on: | |
| pull_request: | |
| workflow_call: | |
| workflow_dispatch: | |
| inputs: | |
| ephemeral-linux: | |
| description: Use the isolated one-job Linux publisher | |
| type: boolean | |
| default: false | |
| permissions: {} | |
| # Only the latest preview of a ref matters: a PR push cancels the superseded | |
| # PR run and a main push cancels the superseded main run. A main commit that | |
| # was overtaken before its preview published is not installable by SHA; the | |
| # tip always is. | |
| concurrency: | |
| group: package-preview-${{ github.event.pull_request.number || github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| publish: | |
| name: Publish pkg.pr.new preview | |
| runs-on: ${{ github.event_name == 'workflow_dispatch' && inputs.ephemeral-linux && fromJSON('["self-hosted", "Linux", "X64", "agent-bundle-publish"]') || 'windows-latest' }} | |
| steps: | |
| - uses: actions/checkout@v7 | |
| - uses: ./.github/actions/setup-workspace | |
| with: | |
| node-version: 22.19.0 | |
| - run: pnpm build | |
| - run: pnpm preview:publish | |
| - name: Verify pkg.pr.new preview artifacts | |
| run: >- | |
| bash scripts/verify-preview-artifacts.sh | |
| "${{ github.event.pull_request.head.sha || github.sha }}" |