2453 card cssreact componenten opsplitsen #1349
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: Continuous Delivery | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| concurrency: | |
| group: ${{ github.ref }} | |
| cancel-in-progress: ${{ github.ref != 'refs/heads/main' }} | |
| jobs: | |
| install: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout branch | |
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| - name: Install pnpm package manager | |
| uses: pnpm/action-setup@fc06bc1257f339d1d5d8b3a19a8cae5388b55320 # v5.0.0 | |
| - name: Set up Node.js version | |
| uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0 | |
| with: | |
| node-version-file: .nvmrc | |
| - name: Check for known security issues with npm packages | |
| run: | | |
| echo "Auditing npm dependencies before installing them. For more information, see: https://nldesignsystem.nl/pnpm-audit" | |
| pnpm audit --audit-level critical --ignore-registry-errors | |
| - name: Install dependencies | |
| run: pnpm install --frozen-lockfile | |
| check-changeset: | |
| runs-on: ubuntu-latest | |
| needs: install | |
| if: github.event_name == 'pull_request' && github.actor != 'nl-design-system-ci' | |
| steps: | |
| - name: Checkout branch | |
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| with: | |
| fetch-depth: 0 | |
| - name: Install pnpm package manager | |
| uses: pnpm/action-setup@fc06bc1257f339d1d5d8b3a19a8cae5388b55320 # v5.0.0 | |
| - name: Set up Node.js | |
| uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0 | |
| with: | |
| node-version-file: .nvmrc | |
| - name: Install dependencies | |
| run: pnpm install --frozen-lockfile | |
| - name: Check for missing changeset | |
| run: pnpm changeset status --since=origin/main | |
| lint: | |
| runs-on: ubuntu-latest | |
| needs: install | |
| steps: | |
| - name: Checkout branch | |
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| - name: Install pnpm package manager | |
| uses: pnpm/action-setup@fc06bc1257f339d1d5d8b3a19a8cae5388b55320 # v5.0.0 | |
| - name: Set up Node.js version | |
| uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0 | |
| with: | |
| node-version-file: .nvmrc | |
| - name: Install dependencies | |
| run: pnpm install --frozen-lockfile | |
| - name: "build internal packages for linting" | |
| run: pnpm --filter "@rijkshuisstijl-community/design-tokens" build | |
| - name: "Continuous Integration: lint" | |
| run: pnpm run --if-present lint | |
| build: | |
| runs-on: ubuntu-latest | |
| needs: install | |
| steps: | |
| - name: Checkout branch | |
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| - name: Install pnpm package manager | |
| uses: pnpm/action-setup@fc06bc1257f339d1d5d8b3a19a8cae5388b55320 # v5.0.0 | |
| - name: Set up Node.js version | |
| uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0 | |
| with: | |
| node-version-file: .nvmrc | |
| - name: Install dependencies | |
| run: pnpm install --frozen-lockfile | |
| - name: "Continuous Integration: build" | |
| env: | |
| BASE_URL: "/utrecht/" | |
| run: pnpm run --if-present build | |
| # Due to dependency on type definitions, typechecking must be done after build | |
| - name: "Continuous Integration: typecheck" | |
| run: pnpm run --if-present typecheck | |
| - name: "Retain build artifact: Storybook" | |
| uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0 | |
| with: | |
| name: storybook | |
| path: packages/storybook/dist/ | |
| retention-days: 1 | |
| - name: "Retain build artifact: Design Tokens" | |
| uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0 | |
| with: | |
| name: design-tokens | |
| path: proprietary/design-tokens/dist/ | |
| - name: "Retain build artifact: CSS component packages" | |
| uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0 | |
| with: | |
| name: css | |
| path: packages/components-css/*/dist/ | |
| - name: "Retain build artifact: React component packages" | |
| uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0 | |
| with: | |
| name: react | |
| path: packages/components-react/*/dist/ | |
| - name: "Retain build artifact: Storybook Angular" | |
| uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0 | |
| with: | |
| name: storybook-angular | |
| path: packages/storybook-angular/dist/ | |
| test: | |
| runs-on: ubuntu-latest | |
| needs: build | |
| steps: | |
| - name: Checkout branch | |
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| with: | |
| fetch-depth: 0 | |
| - name: Install pnpm package manager | |
| uses: pnpm/action-setup@fc06bc1257f339d1d5d8b3a19a8cae5388b55320 # v5.0.0 | |
| - name: Set up Node.js version | |
| uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0 | |
| with: | |
| node-version-file: .nvmrc | |
| - name: "Restore build artifact: Storybook" | |
| uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 | |
| with: | |
| name: storybook | |
| path: packages/storybook/dist/ | |
| - name: "Restore build artifact: Storybook Angular" | |
| uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 | |
| with: | |
| name: storybook-angular | |
| path: packages/storybook-angular/dist/ | |
| - name: "Restore build artifact: CSS" | |
| uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 | |
| with: | |
| name: css | |
| path: packages/components-css/ | |
| - name: "Restore build artifact: React" | |
| uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 | |
| with: | |
| name: react | |
| path: packages/components-react/ | |
| - name: Install dependencies | |
| run: pnpm install --frozen-lockfile | |
| - name: "Continuous Integration: test" | |
| run: pnpm run --if-present test | |
| - name: Publish to Chromatic | |
| uses: chromaui/action@eea1606238fd97a70b5af723d103953d1f40967b # 15.3.1 | |
| if: ${{ github.actor != 'dependabot[bot]' }} | |
| with: | |
| autoAcceptChanges: main | |
| projectToken: ${{ secrets.CHROMATIC_PROJECT_TOKEN }} | |
| storybookBuildDir: packages/storybook/dist/ | |
| exitOnceUploaded: true | |
| - name: Publish to Chromatic | |
| uses: chromaui/action@eea1606238fd97a70b5af723d103953d1f40967b # 15.3.1 | |
| if: ${{ github.actor != 'dependabot[bot]' }} | |
| with: | |
| autoAcceptChanges: main | |
| projectToken: ${{ secrets.ANGULAR_CHROMATIC_PROJECT_TOKEN }} | |
| storybookBuildDir: packages/storybook-angular/dist/ | |
| exitOnceUploaded: true | |
| test-example-applications: | |
| timeout-minutes: 10 | |
| runs-on: ubuntu-latest | |
| needs: build | |
| steps: | |
| - name: Checkout branch | |
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| with: | |
| fetch-depth: 0 | |
| - name: Install pnpm package manager | |
| uses: pnpm/action-setup@fc06bc1257f339d1d5d8b3a19a8cae5388b55320 # v5.0.0 | |
| - name: Set up Node.js version | |
| uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0 | |
| with: | |
| node-version-file: .nvmrc | |
| cache: pnpm | |
| - name: "Restore build artifact: Design Tokens" | |
| uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 | |
| with: | |
| name: design-tokens | |
| path: proprietary/design-tokens/dist/ | |
| - name: "Restore build artifact: CSS" | |
| uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 | |
| with: | |
| name: css | |
| path: packages/components-css/ | |
| - name: "Restore build artifact: React" | |
| uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 | |
| with: | |
| name: react | |
| path: packages/components-react/ | |
| - name: Install dependencies | |
| run: pnpm install --frozen-lockfile | |
| - name: Install Playwright Browsers | |
| run: pnpm --filter "@rijkshuisstijl-community/examples-*" exec playwright install chromium --with-deps | |
| - name: Run Playwright tests | |
| run: pnpm test:e2e | |
| - name: Upload report | |
| uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0 | |
| if: ${{ !cancelled() }} | |
| with: | |
| name: playwright-report | |
| path: playwright-report/ | |
| retention-days: 7 | |
| test-a11y: | |
| timeout-minutes: 60 | |
| runs-on: ubuntu-latest | |
| needs: build | |
| steps: | |
| - name: Checkout branch | |
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| with: | |
| fetch-depth: 0 | |
| - name: Install pnpm package manager | |
| uses: pnpm/action-setup@fc06bc1257f339d1d5d8b3a19a8cae5388b55320 # v5.0.0 | |
| - name: Set up Node.js version | |
| uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0 | |
| with: | |
| node-version-file: .nvmrc | |
| - name: "Restore build artifact: Storybook" | |
| uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 | |
| with: | |
| name: storybook | |
| path: packages/storybook/dist/ | |
| - name: Install dependencies | |
| run: pnpm install --frozen-lockfile | |
| - name: "Accessibility tests Storybook" | |
| run: pnpm test-storybook:ci | |
| publish-website: | |
| runs-on: ubuntu-latest | |
| needs: [lint, test, test-a11y, test-example-applications] | |
| if: ${{ github.ref == 'refs/heads/main' }} | |
| permissions: | |
| pages: write | |
| id-token: write | |
| steps: | |
| - name: Checkout release branch | |
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| - name: "Restore build artifact: Storybook" | |
| uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 | |
| with: | |
| name: storybook | |
| path: packages/storybook/dist/ | |
| - name: Continuous Deployment to GitHub Pages | |
| uses: actions/upload-pages-artifact@7b1f4a764d45c48632c6b24a0339c27f5614fb0b # v4.0.0 | |
| with: | |
| path: packages/storybook/dist/ | |
| publish-npm: | |
| runs-on: ubuntu-latest | |
| needs: [lint, test, test-a11y, test-example-applications] | |
| if: ${{ github.ref == 'refs/heads/main' }} | |
| environment: publish | |
| permissions: | |
| id-token: write | |
| steps: | |
| - name: Checkout release branch | |
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| with: | |
| token: ${{ secrets.GH_TOKEN }} | |
| - name: Install pnpm | |
| uses: pnpm/action-setup@fc06bc1257f339d1d5d8b3a19a8cae5388b55320 # v5.0.0 | |
| - name: Set up Node.js version | |
| uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0 | |
| with: | |
| node-version-file: .nvmrc | |
| - name: "Continuous Deployment: install" | |
| run: pnpm install --frozen-lockfile | |
| - name: "Continuous Deployment: build" | |
| run: pnpm run --if-present build | |
| - name: "Continuous Deployment: update versions and publish to NPM" | |
| uses: changesets/action@6a0a831ff30acef54f2c6aa1cbbc1096b066edaf # v1.7.0 | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} | |
| GIT_AUTHOR_EMAIL: ${{ secrets.GIT_AUTHOR_EMAIL }} | |
| GIT_AUTHOR_NAME: "NL Design System" | |
| GIT_COMMITTER_EMAIL: ${{ secrets.GIT_COMMITTER_EMAIL }} | |
| GIT_COMMITTER_NAME: "NL Design System" | |
| NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | |
| with: | |
| commit: "docs(release): design system packages" | |
| setupGitUser: false | |
| title: "docs(release): design system packages" | |
| publish: "pnpm run publish:changeset" |