Create documentation website #21
Workflow file for this run
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: Pipeline | |
| on: | |
| push: | |
| branches: [main] | |
| paths: | |
| - 'package.json' | |
| - 'pnpm-lock.yaml' | |
| - 'pnpm-workspace.yaml' | |
| - 'turbo.json' | |
| - 'packages/**/src/**' | |
| - 'packages/**/package.json' | |
| - '.changeset/**' | |
| - '.github/workflows/pipeline.yml' | |
| pull_request: | |
| branches: [main] | |
| types: [opened, synchronize, reopened] | |
| paths: | |
| - 'package.json' | |
| - 'pnpm-lock.yaml' | |
| - 'pnpm-workspace.yaml' | |
| - 'turbo.json' | |
| - 'packages/**/src/**' | |
| - 'packages/**/package.json' | |
| - '.changeset/**' | |
| - '.github/workflows/pipeline.yml' | |
| workflow_dispatch: | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| # Cancel in-progress runs on PRs (new push makes old run irrelevant) | |
| # but never cancel on main (could interrupt a release) | |
| cancel-in-progress: ${{ github.event_name == 'pull_request' }} | |
| jobs: | |
| build: | |
| name: Building | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Setup Node.js | |
| uses: ./.github/actions/node | |
| - name: Build all packages | |
| run: pnpm build | |
| - name: Upload dist artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: dist | |
| path: packages/*/dist/ | |
| retention-days: 1 | |
| check: | |
| name: Type Checking | |
| needs: [build] | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Setup Node.js | |
| uses: ./.github/actions/node | |
| - name: Download dist artifacts | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: dist | |
| path: packages | |
| - name: Run the type checker | |
| run: pnpm check --filter "./packages/*" | |
| lint: | |
| name: Linting | |
| needs: [build] | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Setup Node.js | |
| uses: ./.github/actions/node | |
| - name: Download dist artifacts | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: dist | |
| path: packages | |
| - name: Run the linter | |
| run: pnpm lint | |
| test: | |
| name: Testing | |
| needs: [build] | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Setup Node.js | |
| uses: ./.github/actions/node | |
| - name: Download dist artifacts | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: dist | |
| path: packages | |
| - name: Run tests | |
| run: pnpm test | |
| - name: Upload coverage | |
| if: always() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: coverage | |
| path: packages/*/.coverage/ | |
| retention-days: 7 | |
| process: | |
| name: Processing Changesets | |
| needs: [check, lint, test] | |
| runs-on: ubuntu-latest | |
| outputs: | |
| published: ${{ steps.changesets.outputs.published }} | |
| if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }} | |
| permissions: | |
| contents: write | |
| id-token: write | |
| pull-requests: write | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Setup Node.js | |
| uses: ./.github/actions/node | |
| - name: Process changesets | |
| id: changesets | |
| uses: changesets/action@v1 | |
| with: | |
| version: pnpm run release:version | |
| publish: pnpm run release:publish | |
| title: 'Pending Releases' | |
| commit: 'Update changelog and release' | |
| - run: | | |
| echo "published=${{ steps.changesets.outputs.published }}" >> $GITHUB_OUTPUT | |
| snapshot: | |
| name: Releasing Snapshot | |
| needs: [process] | |
| runs-on: ubuntu-latest | |
| if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' && needs.process.outputs.published == 'false' }} | |
| permissions: | |
| contents: read | |
| id-token: write | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Setup Node.js | |
| uses: ./.github/actions/node | |
| - name: Publish snapshot version | |
| run: | | |
| pnpm run release:snapshot:version | |
| pnpm run release:snapshot:publish |