fix workflow #1001
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 Deployment | |
| on: | |
| push: | |
| branches: | |
| - main | |
| - v13 | |
| concurrency: ${{ github.workflow }}-${{ github.ref }} | |
| jobs: | |
| lint: | |
| name: Lint | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 10 | |
| steps: | |
| - name: Checkout default branch | |
| uses: actions/checkout@v6 | |
| - name: Use pnpm | |
| uses: pnpm/action-setup@v4.2.0 | |
| with: | |
| run_install: false | |
| - name: Use Node.js | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version-file: ".nvmrc" | |
| cache: "pnpm" | |
| - name: Install npm dependencies | |
| run: pnpm i --frozen-lockfile | |
| - name: Build Fondue Icons | |
| run: pnpm build:icons | |
| - name: Build Fondue Charts | |
| run: pnpm build:charts | |
| - name: Build Fondue Components | |
| run: pnpm build:components | |
| - name: Build Fondue RTE | |
| run: pnpm build:rte | |
| - name: Lint code | |
| run: pnpm lint | |
| typecheck: | |
| name: Typecheck | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 10 | |
| steps: | |
| - name: Checkout default branch | |
| uses: actions/checkout@v6 | |
| - name: Use pnpm | |
| uses: pnpm/action-setup@v4.2.0 | |
| with: | |
| run_install: false | |
| - name: Use Node.js | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version-file: ".nvmrc" | |
| cache: "pnpm" | |
| - name: Install npm dependencies | |
| run: pnpm i --frozen-lockfile | |
| - name: Build Fondue Icons | |
| run: pnpm build:icons | |
| - name: Build Fondue Charts | |
| run: pnpm build:charts | |
| - name: Build Fondue Components | |
| run: pnpm build:components | |
| - name: Build Fondue RTE | |
| run: pnpm build:rte | |
| - name: Typecheck code | |
| run: pnpm typecheck | |
| rte-component-tests: | |
| name: RTE Component Tests | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 10 | |
| steps: | |
| - name: Checkout current commit | |
| uses: actions/checkout@v4 | |
| - name: Use Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version-file: ".nvmrc" | |
| - name: Use pnpm | |
| uses: pnpm/action-setup@v3 | |
| with: | |
| run_install: false | |
| - name: Get pnpm store directory | |
| id: pnpm-cache | |
| run: echo "pnpm_cache_dir=$(pnpm store path)" >> $GITHUB_OUTPUT | |
| - name: Setup pnpm cache | |
| uses: actions/cache@v4 | |
| id: npm_cache | |
| with: | |
| path: | | |
| ${{ steps.pnpm-cache.outputs.pnpm_cache_dir }} | |
| ~/.cache/Cypress | |
| key: pnpm-with-cypress-${{ runner.os }}-${{ hashFiles('pnpm-lock.yaml') }} | |
| restore-keys: pnpm-with-cypress-${{ runner.os }}-${{ hashFiles('pnpm-lock.yaml') }} | |
| - name: Install dependencies | |
| run: pnpm install --frozen-lockfile | |
| - name: Build Fondue Icons | |
| run: pnpm build:icons | |
| - name: Build Fondue Components | |
| run: pnpm build:components | |
| - name: Component Tests | |
| run: pnpm run --stream --filter {packages/rte} test | |
| component-tests: | |
| name: Component Tests | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 25 | |
| steps: | |
| - name: Checkout current commit | |
| uses: actions/checkout@v6 | |
| - name: Use pnpm | |
| uses: pnpm/action-setup@v4.2.0 | |
| with: | |
| run_install: false | |
| - name: Use Node.js | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version-file: ".nvmrc" | |
| cache: "pnpm" | |
| - name: Install dependencies | |
| run: pnpm install --frozen-lockfile | |
| - name: Build Fondue icons | |
| run: pnpm build:icons | |
| - name: Unit test | |
| run: pnpm --stream --filter {packages/components} test | |
| - name: Install Playwright browsers | |
| run: pnpm --stream --filter {packages/components} install:playwright | |
| - name: Playwright tests | |
| run: pnpm --stream --filter {packages/components} test:components:ci | |
| publish: | |
| name: Publish | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 10 | |
| needs: [lint, typecheck, component-tests] | |
| permissions: | |
| contents: write # to create release (changesets/action) | |
| pull-requests: write # to create pull request (changesets/action) | |
| id-token: write # to authenticate with npm registry via OIDC | |
| steps: | |
| - name: Checkout default branch | |
| uses: actions/checkout@v6 | |
| - name: Use pnpm | |
| uses: pnpm/action-setup@v4.2.0 | |
| with: | |
| run_install: false | |
| - name: Use Node.js | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version-file: ".nvmrc" | |
| cache: "pnpm" | |
| - name: Install npm dependencies | |
| run: pnpm i --frozen-lockfile | |
| - name: Create release PR or publish to npm | |
| id: changesets | |
| uses: changesets/action@v1 | |
| with: | |
| commit: "chore: release packages" | |
| title: "chore: release packages" | |
| createGithubReleases: true | |
| publish: pnpm release | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| NPM_CONFIG_PROVENANCE: true | |
| # Use OIDC for npm authentication instead of NPM_TOKEN | |
| NPM_TOKEN: "" # https://github.com/changesets/changesets/issues/1152#issuecomment-3190884868 |