build: switch to changesets release workflow (#2949) #2994
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: react-day-picker | |
| # How this workflow works: | |
| # - Pull requests and branch pushes run typecheck, lint, test, and build jobs. | |
| # - The build job verifies publish-sensitive invariants like matching versions, | |
| # npm pack contents, and the built-package smoke test. | |
| # | |
| # How to use it: | |
| # - Open a pull request or push a branch to run the main validation suite. | |
| # - Package publishing is handled separately by `.github/workflows/release.yml`. | |
| on: | |
| pull_request: | |
| branches: | |
| - "**" | |
| push: | |
| branches: | |
| - "**" | |
| permissions: | |
| contents: read | |
| jobs: | |
| typecheck: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: pnpm/action-setup@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: 24 | |
| cache: pnpm | |
| registry-url: "https://registry.npmjs.org" | |
| - run: pnpm install --frozen-lockfile | |
| - run: pnpm typecheck | |
| lint: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: pnpm/action-setup@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: 24 | |
| cache: pnpm | |
| - run: pnpm install --frozen-lockfile | |
| - run: pnpm lint ci . --reporter=github | |
| test: | |
| needs: [lint, typecheck] | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: pnpm/action-setup@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: 24 | |
| cache: pnpm | |
| - run: pnpm install --frozen-lockfile | |
| - run: pnpm test | |
| - run: pnpm test:tz | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: pnpm/action-setup@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: 24 | |
| cache: pnpm | |
| - run: pnpm install --frozen-lockfile | |
| - run: pnpm build | |
| - run: pnpm check:versions | |
| - run: pnpm pack:dry-run | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: rdp-dist | |
| path: packages/*/dist | |
| test-build: | |
| runs-on: ubuntu-latest | |
| needs: [build] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: pnpm/action-setup@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: 24 | |
| cache: pnpm | |
| - uses: actions/download-artifact@v4 | |
| with: | |
| name: rdp-dist | |
| path: packages | |
| # Test the downloaded artifact exactly as it would be published on npm. | |
| - run: pnpm install --frozen-lockfile | |
| - run: pnpm test:build |