Version Packages #96
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: Verify Release (Version PR) | |
| on: | |
| pull_request: | |
| types: [opened, synchronize, reopened] | |
| jobs: | |
| # Only run when this is a "Version Packages" PR from changesets | |
| check-pr: | |
| runs-on: ubuntu-latest | |
| outputs: | |
| is_version_pr: ${{ steps.check.outputs.is_version_pr }} | |
| steps: | |
| - name: Check if Version Packages PR | |
| id: check | |
| run: | | |
| if [[ "${{ github.event.pull_request.title }}" == "Version Packages" ]]; then | |
| echo "is_version_pr=true" >> "$GITHUB_OUTPUT" | |
| echo "This is a Version Packages PR - running release verification" | |
| else | |
| echo "is_version_pr=false" >> "$GITHUB_OUTPUT" | |
| echo "Not a Version Packages PR - skipping" | |
| fi | |
| # Build, compile, and smoke test CLI binaries for all platforms | |
| build: | |
| needs: check-pr | |
| if: needs.check-pr.outputs.is_version_pr == 'true' | |
| uses: ./.github/workflows/build-platform.yml | |
| with: | |
| upload-artifacts: true | |
| # Build Docker image (no push) to warm the layer cache for release | |
| docker: | |
| needs: [check-pr, build] | |
| if: needs.check-pr.outputs.is_version_pr == 'true' && needs.build.result == 'success' | |
| uses: ./.github/workflows/docker.yml | |
| with: | |
| version: 0.0.0-verify | |
| push: false | |
| # Verify the docs site builds — we don't want to merge a Version Packages PR | |
| # if the post-release docs deploy would fail. | |
| docs: | |
| needs: check-pr | |
| if: needs.check-pr.outputs.is_version_pr == 'true' | |
| runs-on: ubuntu-latest | |
| name: Verify Docs Build | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: oven-sh/setup-bun@v2 | |
| - name: Install dependencies | |
| run: bun install --frozen-lockfile --ignore-scripts | |
| - name: Build docs site | |
| run: cd packages/docs-site && bun run build | |
| # Summary job for branch protection rules | |
| release-ci-passed: | |
| needs: [check-pr, build, docker, docs] | |
| if: always() | |
| runs-on: ubuntu-latest | |
| name: Release CI Status | |
| steps: | |
| - name: Check results | |
| run: | | |
| if [[ "${{ needs.check-pr.outputs.is_version_pr }}" != "true" ]]; then | |
| echo "Not a version PR - skipping" | |
| exit 0 | |
| fi | |
| if [[ "${{ needs.build.result }}" != "success" ]]; then | |
| echo "Build jobs failed or were cancelled" | |
| exit 1 | |
| fi | |
| if [[ "${{ needs.docker.result }}" != "success" ]]; then | |
| echo "Docker build failed or was cancelled" | |
| exit 1 | |
| fi | |
| if [[ "${{ needs.docs.result }}" != "success" ]]; then | |
| echo "Docs build failed or was cancelled" | |
| exit 1 | |
| fi | |
| echo "All release CI checks passed" |