Skip to content

Commit cce18dc

Browse files
authored
ci: skip building metadata and mocked classesnames for non-release ci… (#3222)
1 parent 53f40e9 commit cce18dc

14 files changed

Lines changed: 33 additions & 13 deletions

File tree

.github/workflows/build-and-upload.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@ name: Build and Upload Artifacts
22

33
on:
44
workflow_call:
5+
inputs:
6+
skip_release_artifacts:
7+
description: Whether to skip release-only build artifacts (mocked classnames, metadata) to speed up CI checks.
8+
type: boolean
9+
default: false
510
secrets:
611
npm_token:
712
required: true
@@ -35,6 +40,7 @@ jobs:
3540
shell: bash
3641
env:
3742
SINCE_FLAG: ${{ steps.determine-since-flag.outputs.since_flag }}
43+
SKIP_RELEASE_ARTIFACTS: ${{ inputs.skip_release_artifacts }}
3844
run: yarn lerna run build $SINCE_FLAG --include-dependencies
3945
- name: Upload
4046
if: ${{ steps.check-changed-packages.outputs.has_changes == 'true' }}

.github/workflows/bundle-size.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ jobs:
1414
build:
1515
name: Build
1616
uses: ./.github/workflows/build-and-upload.yml
17+
with:
18+
skip_release_artifacts: true
1719
secrets:
1820
npm_token: ${{ secrets.npm_token }}
1921

.github/workflows/chromatic.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ jobs:
1111
build:
1212
name: Build
1313
uses: ./.github/workflows/build-and-upload.yml
14+
with:
15+
skip_release_artifacts: true
1416
secrets:
1517
npm_token: ${{ secrets.npm_token }}
1618

packages/base/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,8 @@
3232
}
3333
},
3434
"scripts": {
35-
"build": "rollup -c && mock_classnames=on rollup -c",
35+
"build": "rollup -c && yarn build:mocked-classnames",
36+
"build:mocked-classnames": "[ \"$SKIP_RELEASE_ARTIFACTS\" = \"true\" ] || mock_classnames=on rollup -c",
3637
"test": "vitest run",
3738
"lint": "eslint \"./src/**/*.{js,jsx,ts,tsx}\""
3839
},

packages/components/button/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,8 @@
3232
}
3333
},
3434
"scripts": {
35-
"build": "rollup -c && mock_classnames=on rollup -c",
35+
"build": "rollup -c && yarn build:mocked-classnames",
36+
"build:mocked-classnames": "[ \"$SKIP_RELEASE_ARTIFACTS\" = \"true\" ] || mock_classnames=on rollup -c",
3637
"test": "vitest run",
3738
"lint": "eslint \"./src/**/*.{js,jsx,ts,tsx}\""
3839
},

packages/components/clickable/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,8 @@
3232
}
3333
},
3434
"scripts": {
35-
"build": "rollup -c && mock_classnames=on rollup -c",
35+
"build": "rollup -c && yarn build:mocked-classnames",
36+
"build:mocked-classnames": "[ \"$SKIP_RELEASE_ARTIFACTS\" = \"true\" ] || mock_classnames=on rollup -c",
3637
"test": "vitest run",
3738
"lint": "eslint \"./src/**/*.{js,jsx,ts,tsx}\""
3839
},

packages/components/dialog/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,8 @@
3232
}
3333
},
3434
"scripts": {
35-
"build": "rollup -c && mock_classnames=on rollup -c",
35+
"build": "rollup -c && yarn build:mocked-classnames",
36+
"build:mocked-classnames": "[ \"$SKIP_RELEASE_ARTIFACTS\" = \"true\" ] || mock_classnames=on rollup -c",
3637
"test": "vitest run",
3738
"lint": "eslint \"./src/**/*.{js,jsx,ts,tsx}\""
3839
},

packages/components/icon-button/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,8 @@
3232
}
3333
},
3434
"scripts": {
35-
"build": "rollup -c && mock_classnames=on rollup -c",
35+
"build": "rollup -c && yarn build:mocked-classnames",
36+
"build:mocked-classnames": "[ \"$SKIP_RELEASE_ARTIFACTS\" = \"true\" ] || mock_classnames=on rollup -c",
3637
"test": "vitest run",
3738
"lint": "eslint \"./src/**/*.{js,jsx,ts,tsx}\""
3839
},

packages/components/icon/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,8 @@
3232
}
3333
},
3434
"scripts": {
35-
"build": "rollup -c && mock_classnames=on rollup -c",
35+
"build": "rollup -c && yarn build:mocked-classnames",
36+
"build:mocked-classnames": "[ \"$SKIP_RELEASE_ARTIFACTS\" = \"true\" ] || mock_classnames=on rollup -c",
3637
"test": "vitest run",
3738
"lint": "eslint \"./src/**/*.{js,jsx,ts,tsx}\""
3839
},

packages/components/layer/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,8 @@
3232
}
3333
},
3434
"scripts": {
35-
"build": "rollup -c && mock_classnames=on rollup -c",
35+
"build": "rollup -c && yarn build:mocked-classnames",
36+
"build:mocked-classnames": "[ \"$SKIP_RELEASE_ARTIFACTS\" = \"true\" ] || mock_classnames=on rollup -c",
3637
"test": "vitest run",
3738
"lint": "eslint \"./src/**/*.{js,jsx,ts,tsx}\""
3839
},

0 commit comments

Comments
 (0)