feat(): monorepo first steps with backwards compat #7603
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: '🩺' | |
| on: | |
| pull_request: | |
| branches: [master] | |
| paths-ignore: [CHANGELOG.md] | |
| permissions: | |
| contents: read | |
| jobs: | |
| build: | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - name: Uglified build | |
| uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 | |
| - uses: ./.github/actions/cached-install | |
| with: | |
| node-version: 24.x | |
| - run: pnpm run build | |
| stats: | |
| name: Build stats | |
| runs-on: ubuntu-24.04 | |
| env: | |
| minified: dist/index.min.js | |
| bundled: dist/index.mjs | |
| steps: | |
| - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 | |
| - uses: ./.github/actions/cached-install | |
| with: | |
| node-version: 24.x | |
| - name: Build fabric.js | |
| run: pnpm run build | |
| - name: Create prnumber artifact | |
| run: echo "${{ github.event.pull_request.number }}" >> ./prnumber.txt | |
| - name: Upload Pr Number | |
| uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0 | |
| with: | |
| name: prnumber | |
| path: ./prnumber.txt | |
| - name: Prepare pr stats | |
| id: stats | |
| uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v6.4.1 | |
| with: | |
| result-encoding: string | |
| script: | | |
| const fs = require('fs'); | |
| return JSON.stringify({ | |
| size: { fabric: { minified: fs.statSync(process.env.minified).size, bundled: fs.statSync(process.env.bundled).size } } | |
| }); | |
| - name: Create the artifact for stats | |
| run: echo '${{ steps.stats.outputs.result }}' > ./prstats.txt | |
| - name: Upload Pr stats | |
| uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0 | |
| with: | |
| name: prstats | |
| path: ./prstats.txt | |
| typecheck: | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 | |
| - uses: ./.github/actions/cached-install | |
| with: | |
| node-version: 24.x | |
| - name: Type check | |
| run: pnpm run typecheck | |
| lint: | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - name: Linting | |
| uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 | |
| - uses: ./.github/actions/cached-install | |
| with: | |
| node-version: 24.x | |
| - run: pnpm run lint | |
| prettier: | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - name: Prettier check | |
| uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 | |
| - uses: ./.github/actions/cached-install | |
| with: | |
| node-version: 24.x | |
| - run: pnpm run prettier:check |