From bf8c991055bf4715ded0ebee4d325ac0276650f6 Mon Sep 17 00:00:00 2001 From: Masoud Amjadi Date: Wed, 30 Aug 2023 17:00:02 -0400 Subject: [PATCH 01/60] Publish - @czi-sds/components@15.4.2 --- packages/components/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/components/package.json b/packages/components/package.json index 883595b77..b51ebb05d 100644 --- a/packages/components/package.json +++ b/packages/components/package.json @@ -1,6 +1,6 @@ { "name": "@czi-sds/components", - "version": "15.4.1", + "version": "15.4.2", "main": "dist/index.cjs.js", "module": "dist/index.esm.js", "repository": { From b2fede6389d984ce0fc1e41df43f26e132d20cf1 Mon Sep 17 00:00:00 2001 From: Masoud Amjadi Date: Thu, 31 Aug 2023 00:55:31 -0400 Subject: [PATCH 02/60] fix(github): fix release workflow --- .github/workflows/release.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 68f0a74d4..54678a316 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -28,8 +28,8 @@ jobs: - name: "Setup npm" run: | - npm set registry=//registry.npmjs.org/:_authToken=${secrets.NPM_TOKEN} - npm set "//registry.npmjs.org/:_authToken=${secrets.NPM_TOKEN}" + npm set registry=//registry.npmjs.org/:_authToken=${NPM_TOKEN} + npm set "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" - name: Get yarn cache directory path id: yarn-cache-dir-path From d5ff2cffd5bfa10abb0ef8f4ff18c23533ad95e4 Mon Sep 17 00:00:00 2001 From: Masoud Amjadi Date: Thu, 31 Aug 2023 01:31:03 -0400 Subject: [PATCH 03/60] fix(github): fix release workflow --- .github/workflows/release.yml | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 54678a316..894cfa63f 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -26,10 +26,15 @@ jobs: with: node-version-file: ".node-version" - - name: "Setup npm" - run: | - npm set registry=//registry.npmjs.org/:_authToken=${NPM_TOKEN} - npm set "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" + # - name: "Setup npm" + # run: | + # npm set registry=//registry.npmjs.org/:_authToken=${NPM_TOKEN} + # npm set "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" + + - name: Ensure NPM access + run: npm whoami + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} - name: Get yarn cache directory path id: yarn-cache-dir-path @@ -49,11 +54,6 @@ jobs: - name: Build component library in dist/ run: yarn build - - name: Ensure access - run: npm whoami - env: - NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} - - name: Config git user run: | git config --global user.name "${{ github.actor }}" From b4aa7953d9abbf9357d76a95fe5ed2eaeb7464eb Mon Sep 17 00:00:00 2001 From: Masoud Amjadi Date: Thu, 31 Aug 2023 01:49:02 -0400 Subject: [PATCH 04/60] fix(github): fix npm access step --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 894cfa63f..8332137c4 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -33,7 +33,7 @@ jobs: - name: Ensure NPM access run: npm whoami - env: + with: NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} - name: Get yarn cache directory path From d4e601e8200e4cab979b773534c58f73e3455654 Mon Sep 17 00:00:00 2001 From: Masoud Amjadi Date: Thu, 31 Aug 2023 02:01:17 -0400 Subject: [PATCH 05/60] fix(release): fix release workflow --- .github/workflows/release.yml | 2 +- .npmrc | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) create mode 100644 .npmrc diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 8332137c4..894cfa63f 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -33,7 +33,7 @@ jobs: - name: Ensure NPM access run: npm whoami - with: + env: NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} - name: Get yarn cache directory path diff --git a/.npmrc b/.npmrc new file mode 100644 index 000000000..ae6e20ff4 --- /dev/null +++ b/.npmrc @@ -0,0 +1 @@ +//registry.npmjs.org/:_authToken=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 \ No newline at end of file From 591674f1f84947165ebca1da356bec7b360fbc43 Mon Sep 17 00:00:00 2001 From: Masoud Amjadi Date: Thu, 31 Aug 2023 02:03:13 -0400 Subject: [PATCH 06/60] fix(release): fi release --- .github/workflows/release.yml | 10 ++++++---- .npmrc | 1 - 2 files changed, 6 insertions(+), 5 deletions(-) delete mode 100644 .npmrc diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 894cfa63f..23ac472f5 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -26,10 +26,12 @@ jobs: with: node-version-file: ".node-version" - # - name: "Setup npm" - # run: | - # npm set registry=//registry.npmjs.org/:_authToken=${NPM_TOKEN} - # npm set "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" + - name: "Setup npm" + run: | + npm set registry=//registry.npmjs.org/:_authToken=${NODE_AUTH_TOKEN} + npm set "//registry.npmjs.org/:_authToken=${NODE_AUTH_TOKEN}" + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} - name: Ensure NPM access run: npm whoami diff --git a/.npmrc b/.npmrc deleted file mode 100644 index ae6e20ff4..000000000 --- a/.npmrc +++ /dev/null @@ -1 +0,0 @@ -//registry.npmjs.org/:_authToken=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 \ No newline at end of file From c062e9cafa6fa36a2c3613e35ff2d615686d5bf5 Mon Sep 17 00:00:00 2001 From: Masoud Amjadi Date: Thu, 31 Aug 2023 02:14:53 -0400 Subject: [PATCH 07/60] fix(lerna): fix version script --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 844333145..ee93c42a4 100644 --- a/package.json +++ b/package.json @@ -121,7 +121,7 @@ "lerna-version": "lerna version --no-changelog --conventional-commits --conventional-graduate --yes", "lerna-version-fallback": "lerna version --no-changelog --conventional-commits --yes", "release": "lerna publish from-package --yes", - "version:ci":"lerna version --yes --no-change-log --conventional-commits --create-release github --message 'chore(release): publish'", + "version:ci":"lerna version --yes --no-changelog --conventional-commits --create-release github --message 'chore(release): publish'", "publish:ci": "lerna publish from-package --yes" }, "lint-staged": { From e3fa697b50f22fb1fcd28ac96bad1318180fde09 Mon Sep 17 00:00:00 2001 From: Masoud Amjadi Date: Thu, 31 Aug 2023 02:31:23 -0400 Subject: [PATCH 08/60] fix(release): fix lerna release --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index ee93c42a4..561d336cb 100644 --- a/package.json +++ b/package.json @@ -121,7 +121,7 @@ "lerna-version": "lerna version --no-changelog --conventional-commits --conventional-graduate --yes", "lerna-version-fallback": "lerna version --no-changelog --conventional-commits --yes", "release": "lerna publish from-package --yes", - "version:ci":"lerna version --yes --no-changelog --conventional-commits --create-release github --message 'chore(release): publish'", + "version:ci":"lerna version --yes --no-changelog --conventional-commits", "publish:ci": "lerna publish from-package --yes" }, "lint-staged": { From eeefa12fe2e8e43b4cb35781c43b393ca252fae0 Mon Sep 17 00:00:00 2001 From: Masoud Amjadi Date: Thu, 31 Aug 2023 02:40:46 -0400 Subject: [PATCH 09/60] fix(autocomplete): update storybook stories --- .github/workflows/release.yml | 9 --------- package.json | 3 --- .../components/src/core/Autocomplete/index.stories.tsx | 5 +---- 3 files changed, 1 insertion(+), 16 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 23ac472f5..e8980bce9 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -78,12 +78,3 @@ jobs: env: NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}} run: yarn publish:ci - - - name: Post breaking changes to a Slack channel - env: - SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} - uses: act10ns/slack@v1 - with: - status: complete - config: .github/workflows/slack-breaking-changes.yml - if: contains(payload.commits.*.message, 'breaking changes') diff --git a/package.json b/package.json index 561d336cb..14ba67c63 100644 --- a/package.json +++ b/package.json @@ -118,9 +118,6 @@ "lint": "lerna run lint", "build": "lerna run build", "ci": "yarn install --frozen-lockfile --network-concurrency 1", - "lerna-version": "lerna version --no-changelog --conventional-commits --conventional-graduate --yes", - "lerna-version-fallback": "lerna version --no-changelog --conventional-commits --yes", - "release": "lerna publish from-package --yes", "version:ci":"lerna version --yes --no-changelog --conventional-commits", "publish:ci": "lerna publish from-package --yes" }, diff --git a/packages/components/src/core/Autocomplete/index.stories.tsx b/packages/components/src/core/Autocomplete/index.stories.tsx index 004e2a33c..3fff67ea1 100644 --- a/packages/components/src/core/Autocomplete/index.stories.tsx +++ b/packages/components/src/core/Autocomplete/index.stories.tsx @@ -61,10 +61,7 @@ const Autocomplete = ( search={search} value={multiple ? pendingValue : value} getOptionDisabled={(option: DefaultAutocompleteOption) => { - return ( - option.name === "Type: feature request" || - option.name === "Type: documentation" - ); + return option.name === "Type: feature request"; }} {...props} /> From b0e099f215f00c580e1b4acc625ca1fbb509a8ac Mon Sep 17 00:00:00 2001 From: Masoud Amjadi Date: Thu, 31 Aug 2023 02:53:45 -0400 Subject: [PATCH 10/60] fix(release): disable husky on release --- package.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index 14ba67c63..71dde4ea6 100644 --- a/package.json +++ b/package.json @@ -114,12 +114,12 @@ "test": "lerna run test", "test:updateSnapshots": "lerna run test -- -u", "namespace-check": "lerna run namespace-check", - "prepare": "husky install", + "prepare": "is-ci || husky install", "lint": "lerna run lint", "build": "lerna run build", "ci": "yarn install --frozen-lockfile --network-concurrency 1", - "version:ci":"lerna version --yes --no-changelog --conventional-commits", - "publish:ci": "lerna publish from-package --yes" + "version:ci":"HUSKY=0 lerna version --yes --no-changelog --conventional-commits", + "publish:ci": "HUSKY=0 lerna publish from-package --yes" }, "lint-staged": { "*.{js,jsx,ts,tsx,md,html,css,yml}": "npx prettier --write" From 456712c3558f827c29d20812006d982a819397a2 Mon Sep 17 00:00:00 2001 From: masoudmanson Date: Thu, 31 Aug 2023 07:00:49 +0000 Subject: [PATCH 11/60] Publish - @czi-sds/components@15.4.3 --- packages/components/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/components/package.json b/packages/components/package.json index b51ebb05d..4cee71513 100644 --- a/packages/components/package.json +++ b/packages/components/package.json @@ -1,6 +1,6 @@ { "name": "@czi-sds/components", - "version": "15.4.2", + "version": "15.4.3", "main": "dist/index.cjs.js", "module": "dist/index.esm.js", "repository": { From 8caea5a4e9bd955f37f4a14a287775fbaea0ee3e Mon Sep 17 00:00:00 2001 From: Masoud Amjadi Date: Thu, 31 Aug 2023 03:11:56 -0400 Subject: [PATCH 12/60] fix(release): push changes back to the main branch after lerna publish --- .github/workflows/release.yml | 8 ++++++++ package.json | 2 +- .../components/src/core/Autocomplete/index.stories.tsx | 5 ++++- 3 files changed, 13 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index e8980bce9..b1dd4adfd 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -78,3 +78,11 @@ jobs: env: NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}} run: yarn publish:ci + + - name: Push changes to the main branch + run: | + git checkout main + git merge prod --no-edit + git push origin main + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/package.json b/package.json index 71dde4ea6..83708b949 100644 --- a/package.json +++ b/package.json @@ -114,7 +114,7 @@ "test": "lerna run test", "test:updateSnapshots": "lerna run test -- -u", "namespace-check": "lerna run namespace-check", - "prepare": "is-ci || husky install", + "prepare": "husky install", "lint": "lerna run lint", "build": "lerna run build", "ci": "yarn install --frozen-lockfile --network-concurrency 1", diff --git a/packages/components/src/core/Autocomplete/index.stories.tsx b/packages/components/src/core/Autocomplete/index.stories.tsx index 3fff67ea1..004e2a33c 100644 --- a/packages/components/src/core/Autocomplete/index.stories.tsx +++ b/packages/components/src/core/Autocomplete/index.stories.tsx @@ -61,7 +61,10 @@ const Autocomplete = ( search={search} value={multiple ? pendingValue : value} getOptionDisabled={(option: DefaultAutocompleteOption) => { - return option.name === "Type: feature request"; + return ( + option.name === "Type: feature request" || + option.name === "Type: documentation" + ); }} {...props} /> From 93066586c71f5dfa3688c27cea5c4e5358a37181 Mon Sep 17 00:00:00 2001 From: masoudmanson Date: Thu, 31 Aug 2023 07:15:02 +0000 Subject: [PATCH 13/60] Publish - @czi-sds/components@15.4.4 --- packages/components/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/components/package.json b/packages/components/package.json index 4cee71513..b9fbcb4c6 100644 --- a/packages/components/package.json +++ b/packages/components/package.json @@ -1,6 +1,6 @@ { "name": "@czi-sds/components", - "version": "15.4.3", + "version": "15.4.4", "main": "dist/index.cjs.js", "module": "dist/index.esm.js", "repository": { From a31750a055806e344c110979daeb431031b1fe36 Mon Sep 17 00:00:00 2001 From: Masoud Amjadi Date: Thu, 31 Aug 2023 03:20:36 -0400 Subject: [PATCH 14/60] fix(release): change direct pushing to main into pull request --- .github/workflows/release.yml | 16 +++++++++------- .../src/core/Autocomplete/index.stories.tsx | 5 +---- 2 files changed, 10 insertions(+), 11 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index b1dd4adfd..df7194919 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -79,10 +79,12 @@ jobs: NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}} run: yarn publish:ci - - name: Push changes to the main branch - run: | - git checkout main - git merge prod --no-edit - git push origin main - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - name: Create Pull Request + uses: peter-evans/create-pull-request@v5 + with: + token: ${{ secrets.GITHUB_TOKEN }} + commit-message: "Merge changes from prod to main" + title: "Merge changes from prod to main" + body: "This pull request merges changes from the prod branch to main after Lerna publish." + branch: main + base: prod diff --git a/packages/components/src/core/Autocomplete/index.stories.tsx b/packages/components/src/core/Autocomplete/index.stories.tsx index 004e2a33c..3fff67ea1 100644 --- a/packages/components/src/core/Autocomplete/index.stories.tsx +++ b/packages/components/src/core/Autocomplete/index.stories.tsx @@ -61,10 +61,7 @@ const Autocomplete = ( search={search} value={multiple ? pendingValue : value} getOptionDisabled={(option: DefaultAutocompleteOption) => { - return ( - option.name === "Type: feature request" || - option.name === "Type: documentation" - ); + return option.name === "Type: feature request"; }} {...props} /> From 2ada8aa2f4cb7f045c847cf3357823f5470c8a40 Mon Sep 17 00:00:00 2001 From: masoudmanson Date: Thu, 31 Aug 2023 07:23:39 +0000 Subject: [PATCH 15/60] Publish - @czi-sds/components@15.4.5 --- packages/components/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/components/package.json b/packages/components/package.json index b9fbcb4c6..9053c3278 100644 --- a/packages/components/package.json +++ b/packages/components/package.json @@ -1,6 +1,6 @@ { "name": "@czi-sds/components", - "version": "15.4.4", + "version": "15.4.5", "main": "dist/index.cjs.js", "module": "dist/index.esm.js", "repository": { From b2cfab8ec00e2ff32970cb5de67b84ab9d859797 Mon Sep 17 00:00:00 2001 From: Masoud Amjadi Date: Thu, 31 Aug 2023 13:36:07 -0400 Subject: [PATCH 16/60] fix(release): fix pull request --- .github/workflows/release.yml | 3 ++- packages/components/src/core/Autocomplete/index.stories.tsx | 5 ++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index df7194919..886ec3a49 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -84,7 +84,8 @@ jobs: with: token: ${{ secrets.GITHUB_TOKEN }} commit-message: "Merge changes from prod to main" - title: "Merge changes from prod to main" + title: "chore(release): Merge changes from prod to main" body: "This pull request merges changes from the prod branch to main after Lerna publish." branch: main base: prod + draft: true diff --git a/packages/components/src/core/Autocomplete/index.stories.tsx b/packages/components/src/core/Autocomplete/index.stories.tsx index 3fff67ea1..004e2a33c 100644 --- a/packages/components/src/core/Autocomplete/index.stories.tsx +++ b/packages/components/src/core/Autocomplete/index.stories.tsx @@ -61,7 +61,10 @@ const Autocomplete = ( search={search} value={multiple ? pendingValue : value} getOptionDisabled={(option: DefaultAutocompleteOption) => { - return option.name === "Type: feature request"; + return ( + option.name === "Type: feature request" || + option.name === "Type: documentation" + ); }} {...props} /> From 1da921d19455cf3dfa68d615bbbd83d1d3fa9d17 Mon Sep 17 00:00:00 2001 From: Masoud Amjadi Date: Thu, 31 Aug 2023 18:32:13 -0400 Subject: [PATCH 17/60] fix(release): fix pull request branch name --- .github/workflows/release.yml | 2 +- packages/components/src/core/Autocomplete/index.stories.tsx | 5 +---- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 886ec3a49..63ad0c11f 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -86,6 +86,6 @@ jobs: commit-message: "Merge changes from prod to main" title: "chore(release): Merge changes from prod to main" body: "This pull request merges changes from the prod branch to main after Lerna publish." - branch: main + branch: merge-publish-changes-to-the-main base: prod draft: true diff --git a/packages/components/src/core/Autocomplete/index.stories.tsx b/packages/components/src/core/Autocomplete/index.stories.tsx index 004e2a33c..3fff67ea1 100644 --- a/packages/components/src/core/Autocomplete/index.stories.tsx +++ b/packages/components/src/core/Autocomplete/index.stories.tsx @@ -61,10 +61,7 @@ const Autocomplete = ( search={search} value={multiple ? pendingValue : value} getOptionDisabled={(option: DefaultAutocompleteOption) => { - return ( - option.name === "Type: feature request" || - option.name === "Type: documentation" - ); + return option.name === "Type: feature request"; }} {...props} /> From a29df922dba15cd39777e32958c7ecd32c08772e Mon Sep 17 00:00:00 2001 From: Masoud Amjadi Date: Thu, 31 Aug 2023 18:38:57 -0400 Subject: [PATCH 18/60] fix(version): fix version number --- packages/components/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/components/package.json b/packages/components/package.json index 9053c3278..da2c7aa8e 100644 --- a/packages/components/package.json +++ b/packages/components/package.json @@ -1,6 +1,6 @@ { "name": "@czi-sds/components", - "version": "15.4.5", + "version": "15.4.6", "main": "dist/index.cjs.js", "module": "dist/index.esm.js", "repository": { From bc2f2420c3a7a4a6dd370a1a3d9802179c6f088a Mon Sep 17 00:00:00 2001 From: masoudmanson Date: Thu, 31 Aug 2023 22:41:11 +0000 Subject: [PATCH 19/60] Publish - @czi-sds/components@15.4.7 --- packages/components/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/components/package.json b/packages/components/package.json index da2c7aa8e..6a21abc20 100644 --- a/packages/components/package.json +++ b/packages/components/package.json @@ -1,6 +1,6 @@ { "name": "@czi-sds/components", - "version": "15.4.6", + "version": "15.4.7", "main": "dist/index.cjs.js", "module": "dist/index.esm.js", "repository": { From 48c140feed7f5b5bf3d5133f2e09544d42a32b8e Mon Sep 17 00:00:00 2001 From: Masoud Amjadi Date: Thu, 31 Aug 2023 19:15:13 -0400 Subject: [PATCH 20/60] fix(release): change base branch to main --- .github/workflows/release.yml | 2 +- packages/components/src/core/Autocomplete/index.stories.tsx | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 63ad0c11f..80e90b6f8 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -87,5 +87,5 @@ jobs: title: "chore(release): Merge changes from prod to main" body: "This pull request merges changes from the prod branch to main after Lerna publish." branch: merge-publish-changes-to-the-main - base: prod + base: main draft: true diff --git a/packages/components/src/core/Autocomplete/index.stories.tsx b/packages/components/src/core/Autocomplete/index.stories.tsx index 3fff67ea1..004e2a33c 100644 --- a/packages/components/src/core/Autocomplete/index.stories.tsx +++ b/packages/components/src/core/Autocomplete/index.stories.tsx @@ -61,7 +61,10 @@ const Autocomplete = ( search={search} value={multiple ? pendingValue : value} getOptionDisabled={(option: DefaultAutocompleteOption) => { - return option.name === "Type: feature request"; + return ( + option.name === "Type: feature request" || + option.name === "Type: documentation" + ); }} {...props} /> From cf2890abebc057556de4acd2359c9a8d70e75940 Mon Sep 17 00:00:00 2001 From: masoudmanson Date: Thu, 31 Aug 2023 23:18:18 +0000 Subject: [PATCH 21/60] Publish - @czi-sds/components@15.4.8 --- packages/components/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/components/package.json b/packages/components/package.json index 6a21abc20..6e0df84e7 100644 --- a/packages/components/package.json +++ b/packages/components/package.json @@ -1,6 +1,6 @@ { "name": "@czi-sds/components", - "version": "15.4.7", + "version": "15.4.8", "main": "dist/index.cjs.js", "module": "dist/index.esm.js", "repository": { From 90dfd7cc671e3fcfbc96786527130b49bc840d3d Mon Sep 17 00:00:00 2001 From: Masoud Amjadi Date: Thu, 31 Aug 2023 19:36:34 -0400 Subject: [PATCH 22/60] fix(release): fix final pull request --- .github/workflows/release.yml | 23 +++++++++++++++++-- .../src/core/Autocomplete/index.stories.tsx | 5 +--- 2 files changed, 22 insertions(+), 6 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 80e90b6f8..7ce812b6a 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -79,6 +79,26 @@ jobs: NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}} run: yarn publish:ci + # - name: Create Pull Request + # uses: peter-evans/create-pull-request@v5 + # with: + # token: ${{ secrets.GITHUB_TOKEN }} + # commit-message: "Merge changes from prod to main" + # title: "chore(release): Merge changes from prod to main" + # body: "This pull request merges changes from the prod branch to main after Lerna publish." + # branch: merge-release-changes-back-to-the-main + # base: main + + - name: Checkout main + uses: actions/checkout@v3 + with: + ref: main + + - name: Reset promotion branch + run: | + git fetch origin prod:prod + git reset --hard prod + - name: Create Pull Request uses: peter-evans/create-pull-request@v5 with: @@ -86,6 +106,5 @@ jobs: commit-message: "Merge changes from prod to main" title: "chore(release): Merge changes from prod to main" body: "This pull request merges changes from the prod branch to main after Lerna publish." - branch: merge-publish-changes-to-the-main + branch: main-promotion base: main - draft: true diff --git a/packages/components/src/core/Autocomplete/index.stories.tsx b/packages/components/src/core/Autocomplete/index.stories.tsx index 004e2a33c..3fff67ea1 100644 --- a/packages/components/src/core/Autocomplete/index.stories.tsx +++ b/packages/components/src/core/Autocomplete/index.stories.tsx @@ -61,10 +61,7 @@ const Autocomplete = ( search={search} value={multiple ? pendingValue : value} getOptionDisabled={(option: DefaultAutocompleteOption) => { - return ( - option.name === "Type: feature request" || - option.name === "Type: documentation" - ); + return option.name === "Type: feature request"; }} {...props} /> From 9491495736dd81a604267ee605877fbcb0d87b25 Mon Sep 17 00:00:00 2001 From: masoudmanson Date: Thu, 31 Aug 2023 23:38:44 +0000 Subject: [PATCH 23/60] Publish - @czi-sds/components@15.4.9 --- packages/components/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/components/package.json b/packages/components/package.json index 6e0df84e7..d414d5c17 100644 --- a/packages/components/package.json +++ b/packages/components/package.json @@ -1,6 +1,6 @@ { "name": "@czi-sds/components", - "version": "15.4.8", + "version": "15.4.9", "main": "dist/index.cjs.js", "module": "dist/index.esm.js", "repository": { From 90d77d8e8d971bf0ae0831423de675cb9123e8bc Mon Sep 17 00:00:00 2001 From: Masoud Amjadi Date: Thu, 31 Aug 2023 19:43:31 -0400 Subject: [PATCH 24/60] fix(release): cleanup extra scripts --- .github/workflows/release.yml | 10 ---------- .../components/src/core/Autocomplete/index.stories.tsx | 5 ++++- 2 files changed, 4 insertions(+), 11 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 7ce812b6a..f33a43cca 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -79,16 +79,6 @@ jobs: NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}} run: yarn publish:ci - # - name: Create Pull Request - # uses: peter-evans/create-pull-request@v5 - # with: - # token: ${{ secrets.GITHUB_TOKEN }} - # commit-message: "Merge changes from prod to main" - # title: "chore(release): Merge changes from prod to main" - # body: "This pull request merges changes from the prod branch to main after Lerna publish." - # branch: merge-release-changes-back-to-the-main - # base: main - - name: Checkout main uses: actions/checkout@v3 with: diff --git a/packages/components/src/core/Autocomplete/index.stories.tsx b/packages/components/src/core/Autocomplete/index.stories.tsx index 3fff67ea1..004e2a33c 100644 --- a/packages/components/src/core/Autocomplete/index.stories.tsx +++ b/packages/components/src/core/Autocomplete/index.stories.tsx @@ -61,7 +61,10 @@ const Autocomplete = ( search={search} value={multiple ? pendingValue : value} getOptionDisabled={(option: DefaultAutocompleteOption) => { - return option.name === "Type: feature request"; + return ( + option.name === "Type: feature request" || + option.name === "Type: documentation" + ); }} {...props} /> From f0a40148fd722dcdd9ad8187a0d29df645c804d9 Mon Sep 17 00:00:00 2001 From: masoudmanson Date: Thu, 31 Aug 2023 23:45:56 +0000 Subject: [PATCH 25/60] Publish - @czi-sds/components@15.4.10 --- packages/components/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/components/package.json b/packages/components/package.json index d414d5c17..a0333f1f1 100644 --- a/packages/components/package.json +++ b/packages/components/package.json @@ -1,6 +1,6 @@ { "name": "@czi-sds/components", - "version": "15.4.9", + "version": "15.4.10", "main": "dist/index.cjs.js", "module": "dist/index.esm.js", "repository": { From 78c0644b53be5c75bfb65646d1ab7bb93a338235 Mon Sep 17 00:00:00 2001 From: Masoud Amjadi Date: Thu, 31 Aug 2023 21:16:06 -0400 Subject: [PATCH 26/60] fix(slack): fix breaking changes workflow --- .github/{workflows => }/slack-breaking-changes.yml | 0 .github/workflows/release.yml | 9 +++++++++ 2 files changed, 9 insertions(+) rename .github/{workflows => }/slack-breaking-changes.yml (100%) diff --git a/.github/workflows/slack-breaking-changes.yml b/.github/slack-breaking-changes.yml similarity index 100% rename from .github/workflows/slack-breaking-changes.yml rename to .github/slack-breaking-changes.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index f33a43cca..a29038d15 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -98,3 +98,12 @@ jobs: body: "This pull request merges changes from the prod branch to main after Lerna publish." branch: main-promotion base: main + + - name: Post breaking changes to a Slack channel + env: + SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} + uses: act10ns/slack@v1 + with: + status: complete + config: .github/slack-breaking-changes.yml + if: contains(payload.commits.*.message, 'breaking changes') From 4ac6d3a3e383cc4df0d1d28ecb469a9fbfc6f2e9 Mon Sep 17 00:00:00 2001 From: Masoud Amjadi Date: Thu, 31 Aug 2023 21:24:16 -0400 Subject: [PATCH 27/60] fix(slack): fix breaking changes workflow --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index a29038d15..80206ea4c 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -106,4 +106,4 @@ jobs: with: status: complete config: .github/slack-breaking-changes.yml - if: contains(payload.commits.*.message, 'breaking changes') + if: contains(payload.commits.*.message, 'breaking changes') From ab6c45e8e757f7a95e758db9412ed13451b22ecc Mon Sep 17 00:00:00 2001 From: Masoud Amjadi Date: Thu, 31 Aug 2023 21:28:05 -0400 Subject: [PATCH 28/60] fix(slack): change unrecognized payload to github.event --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 80206ea4c..bf0e45be8 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -106,4 +106,4 @@ jobs: with: status: complete config: .github/slack-breaking-changes.yml - if: contains(payload.commits.*.message, 'breaking changes') + if: contains(github.event.commits.*.message, 'breaking changes') From f2ffc54994cd29d594fc5f8800878e6d6d97950e Mon Sep 17 00:00:00 2001 From: Masoud Amjadi Date: Thu, 31 Aug 2023 22:09:07 -0400 Subject: [PATCH 29/60] fix(rollup): fix unresolved dependencies Add "react/jsx-runtime" to rollup config to fix the unresolved dependencies error on build process. --- .github/workflows/namespace-check.yml | 2 +- .github/workflows/push-tests.yml | 6 +++--- .github/workflows/release.yml | 4 ++-- packages/components/rollup.config.mjs | 6 +++++- packages/data-viz/rollup.config.mjs | 6 +++++- .../data-viz/src/core/HeatmapChart/hooks/useUpdateChart.ts | 2 +- 6 files changed, 17 insertions(+), 9 deletions(-) diff --git a/.github/workflows/namespace-check.yml b/.github/workflows/namespace-check.yml index 896be91fb..35a560958 100644 --- a/.github/workflows/namespace-check.yml +++ b/.github/workflows/namespace-check.yml @@ -12,7 +12,7 @@ jobs: steps: - name: Get yarn cache directory path id: yarn-cache-dir-path - run: echo "::set-output name=dir::$(yarn cache dir)" + run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT - uses: actions/checkout@v3 - uses: bahmutov/npm-install@v1 diff --git a/.github/workflows/push-tests.yml b/.github/workflows/push-tests.yml index 6ab1ee97a..c3b4f5f88 100644 --- a/.github/workflows/push-tests.yml +++ b/.github/workflows/push-tests.yml @@ -13,7 +13,7 @@ jobs: steps: - name: Get yarn cache directory path id: yarn-cache-dir-path - run: echo "::set-output name=dir::$(yarn cache dir)" + run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT - uses: actions/checkout@v3 - uses: bahmutov/npm-install@v1 @@ -30,7 +30,7 @@ jobs: steps: - name: Run Tests id: yarn-cache-dir-path - run: echo "::set-output name=dir::$(yarn cache dir)" + run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT - uses: actions/checkout@v3 - uses: bahmutov/npm-install@v1 @@ -44,7 +44,7 @@ jobs: steps: - name: Get yarn cache directory path id: yarn-cache-dir-path - run: echo "::set-output name=dir::$(yarn cache dir)" + run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT - uses: actions/checkout@v3 - uses: bahmutov/npm-install@v1 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index bf0e45be8..b0e853785 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -40,8 +40,8 @@ jobs: - name: Get yarn cache directory path id: yarn-cache-dir-path - run: echo "::set-output name=dir::$(yarn cache dir)" - - uses: actions/cache@v2 + run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT + - uses: actions/cache@v3 id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`) with: path: "**/node_modules" diff --git a/packages/components/rollup.config.mjs b/packages/components/rollup.config.mjs index f4223455c..474e681a9 100644 --- a/packages/components/rollup.config.mjs +++ b/packages/components/rollup.config.mjs @@ -11,7 +11,6 @@ const config = [ { external: [ ...Object.keys(pkg.peerDependencies || {}), - "@mui/material/styles", /** * (thuang): Do NOT import MUI components from their component directory directly, since * it breaks the ts to js transpilation. Instead, import from "@mui/material" @@ -19,6 +18,11 @@ const config = [ * BAD: import Autocomplete from "@mui/material/Autocomplete"; * GOOD: import { Autocomplete } from "@mui/material"; */ + "@mui/material/styles", + /** + * (masoudmanson): Fixes the (!) Unresolved dependencies warning on build process + */ + "react/jsx-runtime", ], input: "src/index.ts", output: [ diff --git a/packages/data-viz/rollup.config.mjs b/packages/data-viz/rollup.config.mjs index 81d2f684c..bbc90e598 100644 --- a/packages/data-viz/rollup.config.mjs +++ b/packages/data-viz/rollup.config.mjs @@ -12,7 +12,6 @@ const config = [ { external: [ ...Object.keys(pkg.peerDependencies || {}), - "@mui/material/styles", /** * (thuang): Do NOT import MUI components from their component directory directly, since * it breaks the ts to js transpilation. Instead, import from "@mui/material" @@ -20,6 +19,11 @@ const config = [ * BAD: import Autocomplete from "@mui/material/Autocomplete"; * GOOD: import { Autocomplete } from "@mui/material"; */ + "@mui/material/styles", + /** + * (masoudmanson): Fixes the (!) Unresolved dependencies warning on build process + */ + "react/jsx-runtime", ], input: "src/index.ts", output: [ diff --git a/packages/data-viz/src/core/HeatmapChart/hooks/useUpdateChart.ts b/packages/data-viz/src/core/HeatmapChart/hooks/useUpdateChart.ts index ebadd325d..e8f0f8ab3 100644 --- a/packages/data-viz/src/core/HeatmapChart/hooks/useUpdateChart.ts +++ b/packages/data-viz/src/core/HeatmapChart/hooks/useUpdateChart.ts @@ -1,4 +1,4 @@ -import throttle from "lodash/throttle"; +import { throttle } from "lodash"; import { useEffect, useMemo } from "react"; import { CreateChartOptionsProps, createChartOptions } from "./utils"; From c073fad9c5745d94edbb51516bf3284747d7b7f6 Mon Sep 17 00:00:00 2001 From: masoudmanson Date: Fri, 1 Sep 2023 02:17:02 +0000 Subject: [PATCH 30/60] Publish - @czi-sds/components@15.4.11 - @czi-sds/data-viz@0.3.2 --- packages/components/package.json | 2 +- packages/data-viz/package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/components/package.json b/packages/components/package.json index a0333f1f1..43bd238c0 100644 --- a/packages/components/package.json +++ b/packages/components/package.json @@ -1,6 +1,6 @@ { "name": "@czi-sds/components", - "version": "15.4.10", + "version": "15.4.11", "main": "dist/index.cjs.js", "module": "dist/index.esm.js", "repository": { diff --git a/packages/data-viz/package.json b/packages/data-viz/package.json index 09bc1bd22..0b2517ef5 100644 --- a/packages/data-viz/package.json +++ b/packages/data-viz/package.json @@ -1,6 +1,6 @@ { "name": "@czi-sds/data-viz", - "version": "0.3.1", + "version": "0.3.2", "main": "dist/index.cjs.js", "module": "dist/index.esm.js", "author": "", From 70de50d8ef777db376a5445af40ac6b53f2b0eb0 Mon Sep 17 00:00:00 2001 From: Masoud Amjadi Date: Thu, 31 Aug 2023 23:14:50 -0400 Subject: [PATCH 31/60] feat(github): create a new GitHub release on tag push Test breaking changes slack workflow BREAKING CHANGE: Testing breaking changes workflow with new release structure --- .github/workflows/github-release.yml | 21 +++++++++++++++++++ .../src/core/DropdownMenu/GITHUB_LABELS.tsx | 2 +- 2 files changed, 22 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/github-release.yml diff --git a/.github/workflows/github-release.yml b/.github/workflows/github-release.yml new file mode 100644 index 000000000..22b7e006d --- /dev/null +++ b/.github/workflows/github-release.yml @@ -0,0 +1,21 @@ +name: Create release + +on: + push: + tags: + - "*" + +jobs: + release: + name: Release pushed tag + runs-on: ubuntu-latest + steps: + - name: Create release + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + tag: ${{ github.ref_name }} + run: | + gh release create "$tag" \ + --repo="$GITHUB_REPOSITORY" \ + --title="${GITHUB_REPOSITORY#*/} ${tag#v}" \ + --generate-notes diff --git a/packages/components/src/core/DropdownMenu/GITHUB_LABELS.tsx b/packages/components/src/core/DropdownMenu/GITHUB_LABELS.tsx index 5b5695aea..ade053027 100644 --- a/packages/components/src/core/DropdownMenu/GITHUB_LABELS.tsx +++ b/packages/components/src/core/DropdownMenu/GITHUB_LABELS.tsx @@ -98,7 +98,7 @@ export const GITHUB_LABELS: DefaultDropdownMenuOption[] = [ ), - name: "custom 2", + name: "Available labels", section: "custom component", }, ]; From 8bf241f017a428038e2db65b4c6ee30883a5ad6b Mon Sep 17 00:00:00 2001 From: masoudmanson Date: Fri, 1 Sep 2023 03:22:44 +0000 Subject: [PATCH 32/60] Publish - @czi-sds/components@16.0.0 --- packages/components/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/components/package.json b/packages/components/package.json index 43bd238c0..74de25831 100644 --- a/packages/components/package.json +++ b/packages/components/package.json @@ -1,6 +1,6 @@ { "name": "@czi-sds/components", - "version": "15.4.11", + "version": "16.0.0", "main": "dist/index.cjs.js", "module": "dist/index.esm.js", "repository": { From dc5cb65a01df0047a50925c03c4168e5c70121a7 Mon Sep 17 00:00:00 2001 From: Masoud Amjadi Date: Thu, 31 Aug 2023 23:32:37 -0400 Subject: [PATCH 33/60] fix(release): debugg release workflow BREAKING CHANGE: Test --- .github/workflows/github-release.yml | 3 +++ .github/workflows/release.yml | 3 +++ packages/components/src/core/Autocomplete/index.stories.tsx | 5 +---- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/.github/workflows/github-release.yml b/.github/workflows/github-release.yml index 22b7e006d..38a10c147 100644 --- a/.github/workflows/github-release.yml +++ b/.github/workflows/github-release.yml @@ -10,6 +10,9 @@ jobs: name: Release pushed tag runs-on: ubuntu-latest steps: + - name: Debugging step + run: echo "Creating GitHub release workflow is running!" + - name: Create release env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index b0e853785..45f341d79 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -99,6 +99,9 @@ jobs: branch: main-promotion base: main + - name: Debugging step + run: echo "GitHub event commits = $(github.event.commits)" + - name: Post breaking changes to a Slack channel env: SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} diff --git a/packages/components/src/core/Autocomplete/index.stories.tsx b/packages/components/src/core/Autocomplete/index.stories.tsx index 004e2a33c..3fff67ea1 100644 --- a/packages/components/src/core/Autocomplete/index.stories.tsx +++ b/packages/components/src/core/Autocomplete/index.stories.tsx @@ -61,10 +61,7 @@ const Autocomplete = ( search={search} value={multiple ? pendingValue : value} getOptionDisabled={(option: DefaultAutocompleteOption) => { - return ( - option.name === "Type: feature request" || - option.name === "Type: documentation" - ); + return option.name === "Type: feature request"; }} {...props} /> From 249b0a529dfd4783ed981d0eb2d0f589364bd6e5 Mon Sep 17 00:00:00 2001 From: masoudmanson Date: Fri, 1 Sep 2023 03:38:24 +0000 Subject: [PATCH 34/60] Publish - @czi-sds/components@17.0.0 --- packages/components/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/components/package.json b/packages/components/package.json index 74de25831..f8d24111b 100644 --- a/packages/components/package.json +++ b/packages/components/package.json @@ -1,6 +1,6 @@ { "name": "@czi-sds/components", - "version": "16.0.0", + "version": "17.0.0", "main": "dist/index.cjs.js", "module": "dist/index.esm.js", "repository": { From 3fc2c53e46da529b7a7b7aa3aff78bec8c0e727a Mon Sep 17 00:00:00 2001 From: Masoud Amjadi Date: Fri, 1 Sep 2023 00:00:14 -0400 Subject: [PATCH 35/60] fix(debug): debug --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 45f341d79..09aadc778 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -100,7 +100,7 @@ jobs: base: main - name: Debugging step - run: echo "GitHub event commits = $(github.event.commits)" + run: echo "GitHub event commits = $(github.event)" - name: Post breaking changes to a Slack channel env: From c763f20373d25c615512a2359b3c7434f88442da Mon Sep 17 00:00:00 2001 From: Masoud Amjadi Date: Fri, 1 Sep 2023 00:10:47 -0400 Subject: [PATCH 36/60] fix(debug): debug --- .github/workflows/release.yml | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 09aadc778..c64001056 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -99,8 +99,15 @@ jobs: branch: main-promotion base: main - - name: Debugging step - run: echo "GitHub event commits = $(github.event)" + - name: Dump GitHub context + env: + GITHUB_CONTEXT: ${{ toJson(github) }} + GITHUB_EVENT: ${{ toJson(github.event) }} + GITHUB_COMMITS: ${{ toJson(github.event.commits) }} + run: | + echo "$GITHUB_CONTEXT" + echo "$GITHUB_EVENT" + echo "$GITHUB_COMMITS" - name: Post breaking changes to a Slack channel env: From 5360b7cffb6598655b1e5ce5c3f9b5985a2d765c Mon Sep 17 00:00:00 2001 From: Masoud Amjadi Date: Fri, 1 Sep 2023 00:25:01 -0400 Subject: [PATCH 37/60] fix(debug): debug --- .github/workflows/release.yml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index c64001056..ee59baa1d 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -102,12 +102,10 @@ jobs: - name: Dump GitHub context env: GITHUB_CONTEXT: ${{ toJson(github) }} - GITHUB_EVENT: ${{ toJson(github.event) }} - GITHUB_COMMITS: ${{ toJson(github.event.commits) }} + GITHUB_MESSAGES: ${{ toJson(github.event.commits.*.message) }} run: | echo "$GITHUB_CONTEXT" - echo "$GITHUB_EVENT" - echo "$GITHUB_COMMITS" + echo "$GITHUB_MESSAGES" - name: Post breaking changes to a Slack channel env: From 52ab8f0b3bfe891a09ae276d34ee50fd98e9c438 Mon Sep 17 00:00:00 2001 From: Masoud Amjadi Date: Fri, 1 Sep 2023 00:41:02 -0400 Subject: [PATCH 38/60] fix(debug): debug --- .github/workflows/release.yml | 27 +++++++++++++++------------ 1 file changed, 15 insertions(+), 12 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index ee59baa1d..d01b99662 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -21,10 +21,11 @@ jobs: with: fetch-depth: 0 - - name: Setup Node.js + - name: Setup Node.js and Cache yarn uses: actions/setup-node@v3 with: node-version-file: ".node-version" + cache: "yarn" - name: "Setup npm" run: | @@ -38,19 +39,19 @@ jobs: env: NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} - - name: Get yarn cache directory path - id: yarn-cache-dir-path - run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT - - uses: actions/cache@v3 - id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`) - with: - path: "**/node_modules" - key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} - restore-keys: | - ${{ runner.os }}-yarn- + # - name: Get yarn cache directory path + # id: yarn-cache-dir-path + # run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT + # - uses: actions/cache@v3 + # id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`) + # with: + # path: "**/node_modules" + # key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} + # restore-keys: | + # ${{ runner.os }}-yarn- - name: Install dependencies - if: steps.yarn-cache.outputs.cache-hit != 'true' + # if: steps.yarn-cache.outputs.cache-hit != 'true' run: yarn ci - name: Build component library in dist/ @@ -103,9 +104,11 @@ jobs: env: GITHUB_CONTEXT: ${{ toJson(github) }} GITHUB_MESSAGES: ${{ toJson(github.event.commits.*.message) }} + GITHUB_CONDITION: ${{ contains(github.event.commits.*.message, 'fix') }} run: | echo "$GITHUB_CONTEXT" echo "$GITHUB_MESSAGES" + echo "$GITHUB_CONDITION" - name: Post breaking changes to a Slack channel env: From e91c9b1805ee2419e1cb61602d01b622e4ff1c71 Mon Sep 17 00:00:00 2001 From: Masoud Amjadi Date: Fri, 1 Sep 2023 00:52:14 -0400 Subject: [PATCH 39/60] fix(debug): debug --- .github/workflows/release.yml | 6 +++--- package.json | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index d01b99662..f19514bb7 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -29,8 +29,8 @@ jobs: - name: "Setup npm" run: | - npm set registry=//registry.npmjs.org/:_authToken=${NODE_AUTH_TOKEN} - npm set "//registry.npmjs.org/:_authToken=${NODE_AUTH_TOKEN}" + npm set registry=https://registry.npmjs.org/:_authToken=${NODE_AUTH_TOKEN} + npm set "https://registry.npmjs.org/:_authToken=${NODE_AUTH_TOKEN}" env: NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} @@ -104,7 +104,7 @@ jobs: env: GITHUB_CONTEXT: ${{ toJson(github) }} GITHUB_MESSAGES: ${{ toJson(github.event.commits.*.message) }} - GITHUB_CONDITION: ${{ contains(github.event.commits.*.message, 'fix') }} + GITHUB_CONDITION: ${{ contains(fromJSON(github.event.commits.*.message), 'fix') }} run: | echo "$GITHUB_CONTEXT" echo "$GITHUB_MESSAGES" diff --git a/package.json b/package.json index 83708b949..f515e8818 100644 --- a/package.json +++ b/package.json @@ -117,7 +117,7 @@ "prepare": "husky install", "lint": "lerna run lint", "build": "lerna run build", - "ci": "yarn install --frozen-lockfile --network-concurrency 1", + "ci": "yarn install --immutable", "version:ci":"HUSKY=0 lerna version --yes --no-changelog --conventional-commits", "publish:ci": "HUSKY=0 lerna publish from-package --yes" }, From b42603fa77a973d7bd4b36fa1fec64bbb25a59ae Mon Sep 17 00:00:00 2001 From: Masoud Amjadi Date: Fri, 1 Sep 2023 00:56:09 -0400 Subject: [PATCH 40/60] fix(debug): debug --- .github/workflows/release.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index f19514bb7..8ba7beaba 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -29,8 +29,8 @@ jobs: - name: "Setup npm" run: | - npm set registry=https://registry.npmjs.org/:_authToken=${NODE_AUTH_TOKEN} - npm set "https://registry.npmjs.org/:_authToken=${NODE_AUTH_TOKEN}" + npm set registry=//https://registry.npmjs.org/:_authToken=${NODE_AUTH_TOKEN} + npm set "//https://registry.npmjs.org/:_authToken=${NODE_AUTH_TOKEN}" env: NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} @@ -104,7 +104,7 @@ jobs: env: GITHUB_CONTEXT: ${{ toJson(github) }} GITHUB_MESSAGES: ${{ toJson(github.event.commits.*.message) }} - GITHUB_CONDITION: ${{ contains(fromJSON(github.event.commits.*.message), 'fix') }} + GITHUB_CONDITION: ${{ contains(fromJson(github.event.commits.*.message), 'fix') }} run: | echo "$GITHUB_CONTEXT" echo "$GITHUB_MESSAGES" From 2055dc06d50d53c5c95f86041ba2eb19b7602e8e Mon Sep 17 00:00:00 2001 From: Masoud Amjadi Date: Fri, 1 Sep 2023 01:16:03 -0400 Subject: [PATCH 41/60] fix(debug): debug --- .github/workflows/release.yml | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 8ba7beaba..a511fb430 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -29,8 +29,8 @@ jobs: - name: "Setup npm" run: | - npm set registry=//https://registry.npmjs.org/:_authToken=${NODE_AUTH_TOKEN} - npm set "//https://registry.npmjs.org/:_authToken=${NODE_AUTH_TOKEN}" + npm set registry=//registry.npmjs.org/:_authToken=${NODE_AUTH_TOKEN} + npm set "//registry.npmjs.org/:_authToken=${NODE_AUTH_TOKEN}" env: NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} @@ -102,14 +102,25 @@ jobs: - name: Dump GitHub context env: - GITHUB_CONTEXT: ${{ toJson(github) }} GITHUB_MESSAGES: ${{ toJson(github.event.commits.*.message) }} - GITHUB_CONDITION: ${{ contains(fromJson(github.event.commits.*.message), 'fix') }} + GITHUB_CONDITION: ${{ contains(fromJSON(github.event.commits.*.message), "fix") }} run: | - echo "$GITHUB_CONTEXT" echo "$GITHUB_MESSAGES" echo "$GITHUB_CONDITION" + - name: Dump GitHub context + run: | + for commit in ${{ toJson(github.event.commits) }}; do + message=$(echo "$commit" | jq -r '.message') + if [[ $message == *"fix"* ]]; then + GITHUB_CONDITION=true + else + GITHUB_CONDITION=false + fi + echo "Commit Message: $message" + echo "GITHUB_CONDITION: $GITHUB_CONDITION" + done + - name: Post breaking changes to a Slack channel env: SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} From 664d912d2345c74747fc42ab99abe8a7bb27782a Mon Sep 17 00:00:00 2001 From: Masoud Amjadi Date: Fri, 1 Sep 2023 01:16:54 -0400 Subject: [PATCH 42/60] fix(debug): debug --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index a511fb430..c6a82d24b 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -103,7 +103,7 @@ jobs: - name: Dump GitHub context env: GITHUB_MESSAGES: ${{ toJson(github.event.commits.*.message) }} - GITHUB_CONDITION: ${{ contains(fromJSON(github.event.commits.*.message), "fix") }} + GITHUB_CONDITION: ${{ contains(fromJSON(github.event.commits.*.message), 'fix') }} run: | echo "$GITHUB_MESSAGES" echo "$GITHUB_CONDITION" From 4db300546c44a95925753b4391847f44f5ccdcdc Mon Sep 17 00:00:00 2001 From: Masoud Amjadi Date: Fri, 1 Sep 2023 01:23:26 -0400 Subject: [PATCH 43/60] fix(debug): debug --- .github/workflows/release.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index c6a82d24b..9fd6c2126 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -103,7 +103,7 @@ jobs: - name: Dump GitHub context env: GITHUB_MESSAGES: ${{ toJson(github.event.commits.*.message) }} - GITHUB_CONDITION: ${{ contains(fromJSON(github.event.commits.*.message), 'fix') }} + GITHUB_CONDITION: ${{ contains(github.event.commits.*.message, 'fix') }} run: | echo "$GITHUB_MESSAGES" echo "$GITHUB_CONDITION" @@ -113,12 +113,12 @@ jobs: for commit in ${{ toJson(github.event.commits) }}; do message=$(echo "$commit" | jq -r '.message') if [[ $message == *"fix"* ]]; then - GITHUB_CONDITION=true + GITHUB_CONDITION_2=true else - GITHUB_CONDITION=false + GITHUB_CONDITION_2=false fi echo "Commit Message: $message" - echo "GITHUB_CONDITION: $GITHUB_CONDITION" + echo "GITHUB_CONDITION: $GITHUB_CONDITION_2" done - name: Post breaking changes to a Slack channel From 70ae46a814377d685073e28924afb87a90e961b1 Mon Sep 17 00:00:00 2001 From: Masoud Amjadi Date: Fri, 1 Sep 2023 01:30:26 -0400 Subject: [PATCH 44/60] fix(debug): debug --- .github/workflows/release.yml | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 9fd6c2126..0921332dc 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -29,7 +29,6 @@ jobs: - name: "Setup npm" run: | - npm set registry=//registry.npmjs.org/:_authToken=${NODE_AUTH_TOKEN} npm set "//registry.npmjs.org/:_authToken=${NODE_AUTH_TOKEN}" env: NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} @@ -109,17 +108,10 @@ jobs: echo "$GITHUB_CONDITION" - name: Dump GitHub context + env: + RESULT: ${{ contains(fromJSON('["push", "pull_request"]'), 'push') }} run: | - for commit in ${{ toJson(github.event.commits) }}; do - message=$(echo "$commit" | jq -r '.message') - if [[ $message == *"fix"* ]]; then - GITHUB_CONDITION_2=true - else - GITHUB_CONDITION_2=false - fi - echo "Commit Message: $message" - echo "GITHUB_CONDITION: $GITHUB_CONDITION_2" - done + echo "$RESULT" - name: Post breaking changes to a Slack channel env: From 0da1fb8df8218cee7642c34914bea080b6e65b6a Mon Sep 17 00:00:00 2001 From: Masoud Amjadi Date: Fri, 1 Sep 2023 01:36:46 -0400 Subject: [PATCH 45/60] fix(debug): debug --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 0921332dc..4771661c2 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -109,7 +109,7 @@ jobs: - name: Dump GitHub context env: - RESULT: ${{ contains(fromJSON('["push", "pull_request"]'), 'push') }} + RESULT: ${{ contains(fromJSON('["push(test)", "pull_request", "pushh"]'), 'push') }} run: | echo "$RESULT" From 2b88353146c94d39bc08143ed0e45b463beb68a7 Mon Sep 17 00:00:00 2001 From: Masoud Amjadi Date: Fri, 1 Sep 2023 02:08:02 -0400 Subject: [PATCH 46/60] fix(slack): fix slack workflow's condition BREAKING CHANGE: test slack workflow with the new release structure --- .github/workflows/release.yml | 21 ++------------------- 1 file changed, 2 insertions(+), 19 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 4771661c2..ffa19ecf3 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -38,17 +38,6 @@ jobs: env: NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} - # - name: Get yarn cache directory path - # id: yarn-cache-dir-path - # run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT - # - uses: actions/cache@v3 - # id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`) - # with: - # path: "**/node_modules" - # key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} - # restore-keys: | - # ${{ runner.os }}-yarn- - - name: Install dependencies # if: steps.yarn-cache.outputs.cache-hit != 'true' run: yarn ci @@ -102,17 +91,11 @@ jobs: - name: Dump GitHub context env: GITHUB_MESSAGES: ${{ toJson(github.event.commits.*.message) }} - GITHUB_CONDITION: ${{ contains(github.event.commits.*.message, 'fix') }} + GITHUB_CONDITION: ${{ contains(toJson(github.event.commits.*.message), 'fix') }} run: | echo "$GITHUB_MESSAGES" echo "$GITHUB_CONDITION" - - name: Dump GitHub context - env: - RESULT: ${{ contains(fromJSON('["push(test)", "pull_request", "pushh"]'), 'push') }} - run: | - echo "$RESULT" - - name: Post breaking changes to a Slack channel env: SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} @@ -120,4 +103,4 @@ jobs: with: status: complete config: .github/slack-breaking-changes.yml - if: contains(github.event.commits.*.message, 'breaking changes') + if: contains(toJson(github.event.commits.*.message), 'breaking changes') From ff43e877dc6464587c9401d86efc4f55d96b26d1 Mon Sep 17 00:00:00 2001 From: Masoud Amjadi Date: Fri, 1 Sep 2023 02:26:13 -0400 Subject: [PATCH 47/60] fix(slack): fix slack workflow fix the workflow condition BREAKING CHANGE: This is only to test the new release structure --- .github/workflows/release.yml | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index ffa19ecf3..bdbc8e96a 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -88,14 +88,6 @@ jobs: branch: main-promotion base: main - - name: Dump GitHub context - env: - GITHUB_MESSAGES: ${{ toJson(github.event.commits.*.message) }} - GITHUB_CONDITION: ${{ contains(toJson(github.event.commits.*.message), 'fix') }} - run: | - echo "$GITHUB_MESSAGES" - echo "$GITHUB_CONDITION" - - name: Post breaking changes to a Slack channel env: SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} @@ -103,4 +95,4 @@ jobs: with: status: complete config: .github/slack-breaking-changes.yml - if: contains(toJson(github.event.commits.*.message), 'breaking changes') + if: contains(toJson(github.event.commits.*.message), 'BREAKING CHANGE') From 81d8bcab5f3b9a630592b00cb8e9580d168aed9f Mon Sep 17 00:00:00 2001 From: Masoud Amjadi Date: Fri, 1 Sep 2023 03:26:43 -0400 Subject: [PATCH 48/60] fix(d): d --- .github/workflows/release.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index bdbc8e96a..b8da7f6ac 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -94,5 +94,6 @@ jobs: uses: act10ns/slack@v1 with: status: complete + channel: "#sci-design-system-breaking-changes" config: .github/slack-breaking-changes.yml if: contains(toJson(github.event.commits.*.message), 'BREAKING CHANGE') From 3169b9facb521a3adf3928ef313a6a0f9a065700 Mon Sep 17 00:00:00 2001 From: Masoud Amjadi Date: Fri, 1 Sep 2023 03:53:16 -0400 Subject: [PATCH 49/60] fix(workflows): update GitHub workflows Update and optimize all GitHub workflows to the latest versions of actions BREAKING CHANGE: Test slack web hook --- .github/workflows/chromatic.yml | 13 +++--- .github/workflows/namespace-check.yml | 17 +++++--- .github/workflows/push-tests.yml | 57 ++++++++++++++++++--------- .github/workflows/release.yml | 5 --- .github/workflows/storybook-tests.yml | 17 ++++++-- .github/workflows/storybook.yml | 17 +++++--- 6 files changed, 82 insertions(+), 44 deletions(-) diff --git a/.github/workflows/chromatic.yml b/.github/workflows/chromatic.yml index f6f631449..2d74fc417 100644 --- a/.github/workflows/chromatic.yml +++ b/.github/workflows/chromatic.yml @@ -11,21 +11,22 @@ jobs: runs-on: ubuntu-latest steps: - # 👇 Version 2 of the action - name: Checkout repository uses: actions/checkout@v3 with: - fetch-depth: 0 # 👈 Required to retrieve git history - - uses: actions/setup-node@v3 + fetch-depth: 0 + + - name: Setup Node.js + uses: actions/setup-node@v3 with: node-version-file: ".node-version" + cache: "yarn" + - name: Install dependencies run: yarn - # 👇 Adds Chromatic as a step in the workflow + - name: Publish to Chromatic uses: chromaui/action@v1 - # Options required to the GitHub Chromatic Action with: token: ${{ secrets.GITHUB_TOKEN }} - # 👇 Chromatic projectToken, refer to the manage page to obtain it. projectToken: ${{ secrets.CHROMATIC_PROJECT_TOKEN }} diff --git a/.github/workflows/namespace-check.yml b/.github/workflows/namespace-check.yml index 35a560958..385dc1514 100644 --- a/.github/workflows/namespace-check.yml +++ b/.github/workflows/namespace-check.yml @@ -7,15 +7,20 @@ on: - prod jobs: - test: + namespace-check: runs-on: ubuntu-latest steps: - - name: Get yarn cache directory path - id: yarn-cache-dir-path - run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT + - name: Checkout code + uses: actions/checkout@v3 - - uses: actions/checkout@v3 - - uses: bahmutov/npm-install@v1 + - name: Setup Node.js + uses: actions/setup-node@v3 + with: + node-version-file: ".node-version" + cache: "yarn" + + - name: Install dependencies + run: yarn - name: Build component library in dist/ run: yarn build diff --git a/.github/workflows/push-tests.yml b/.github/workflows/push-tests.yml index c3b4f5f88..b861bbb6e 100644 --- a/.github/workflows/push-tests.yml +++ b/.github/workflows/push-tests.yml @@ -9,14 +9,21 @@ on: jobs: lint: - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest steps: - - name: Get yarn cache directory path - id: yarn-cache-dir-path - run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT + - name: Checkout repository + uses: actions/checkout@v3 + with: + fetch-depth: 0 - - uses: actions/checkout@v3 - - uses: bahmutov/npm-install@v1 + - name: Setup Node.js + uses: actions/setup-node@v3 + with: + node-version-file: ".node-version" + cache: "yarn" + + - name: Install dependencies + run: yarn - name: Build component library in dist/ run: yarn build @@ -26,28 +33,42 @@ jobs: yarn lint test: - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest steps: - - name: Run Tests - id: yarn-cache-dir-path - run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT + - name: Checkout repository + uses: actions/checkout@v3 + with: + fetch-depth: 0 + + - name: Setup Node.js + uses: actions/setup-node@v3 + with: + node-version-file: ".node-version" + cache: "yarn" - - uses: actions/checkout@v3 - - uses: bahmutov/npm-install@v1 + - name: Install dependencies + run: yarn - name: Test run: | yarn test build: - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest steps: - - name: Get yarn cache directory path - id: yarn-cache-dir-path - run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT + - name: Checkout repository + uses: actions/checkout@v3 + with: + fetch-depth: 0 + + - name: Setup Node.js + uses: actions/setup-node@v3 + with: + node-version-file: ".node-version" + cache: "yarn" - - uses: actions/checkout@v3 - - uses: bahmutov/npm-install@v1 + - name: Install dependencies + run: yarn - name: Build run: | diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index b8da7f6ac..c2750deeb 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -6,10 +6,6 @@ on: # .releaserc.js. So we'll need to manually add such branch's name here manually branches: - prod - - next - - next-major - - beta - - alpha jobs: release: @@ -39,7 +35,6 @@ jobs: NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} - name: Install dependencies - # if: steps.yarn-cache.outputs.cache-hit != 'true' run: yarn ci - name: Build component library in dist/ diff --git a/.github/workflows/storybook-tests.yml b/.github/workflows/storybook-tests.yml index c8e889674..76e7ace86 100644 --- a/.github/workflows/storybook-tests.yml +++ b/.github/workflows/storybook-tests.yml @@ -11,18 +11,29 @@ jobs: timeout-minutes: 60 runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 - - uses: actions/setup-node@v3 + - name: Checkout repository + uses: actions/checkout@v3 + with: + fetch-depth: 0 + + - name: Setup Node.js + uses: actions/setup-node@v3 with: node-version-file: ".node-version" + cache: "yarn" + - name: Install dependencies run: yarn + - name: Install Playwright run: npx playwright install --with-deps + - name: Build Storybook run: yarn build-storybook --quiet - - name: Run accessibility tests 🤟 + + - name: Run accessibility tests run: yarn storybook:axeOnly + - name: Serve Storybook and run tests run: | npx concurrently -k -s first -n "SB,TEST" -c "magenta,blue" \ diff --git a/.github/workflows/storybook.yml b/.github/workflows/storybook.yml index bd09ba4ad..a2b72075f 100644 --- a/.github/workflows/storybook.yml +++ b/.github/workflows/storybook.yml @@ -8,18 +8,23 @@ jobs: build-and-deploy: runs-on: ubuntu-latest steps: - - name: Checkout 🛎️ + - name: Checkout repository uses: actions/checkout@v3 with: - persist-credentials: false - - uses: actions/setup-node@v3 + fetch-depth: 0 + + - name: Setup Node.js + uses: actions/setup-node@v3 with: node-version-file: ".node-version" - - name: Install and Build 🔧 + cache: "yarn" + + - name: Install and Build run: | # Install npm packages and build the Storybook files - yarn install + yarn yarn build-storybook - - name: Deploy 🚀 + + - name: Deploy uses: JamesIves/github-pages-deploy-action@v4 with: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} From 1dc1c4271ae07a5f241658d5533158fac34e32f6 Mon Sep 17 00:00:00 2001 From: Masoud Amjadi Date: Fri, 1 Sep 2023 04:13:49 -0400 Subject: [PATCH 50/60] fix(github): fix github release workflow --- .github/workflows/github-release.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/github-release.yml b/.github/workflows/github-release.yml index 38a10c147..23ae03ad5 100644 --- a/.github/workflows/github-release.yml +++ b/.github/workflows/github-release.yml @@ -16,9 +16,9 @@ jobs: - name: Create release env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - tag: ${{ github.ref_name }} + tag: ${{ github.ref }} run: | gh release create "$tag" \ --repo="$GITHUB_REPOSITORY" \ - --title="${GITHUB_REPOSITORY#*/} ${tag#v}" \ + --title="${GITHUB_REPOSITORY#*/} ${tag#refs/tags/v}" \ --generate-notes From 6c72a81ac53e3fddb49c82ccd095eb0e8ae055ea Mon Sep 17 00:00:00 2001 From: Masoud Amjadi Date: Fri, 1 Sep 2023 14:20:35 -0400 Subject: [PATCH 51/60] fix(comments): add comments to all yaml files --- .github/workflows/chromatic.yml | 18 +++++++----- .github/workflows/commitlint.yml | 9 ++++-- .github/workflows/github-release.yml | 12 +++++--- .github/workflows/namespace-check.yml | 18 ++++++++---- .github/workflows/push-tests.yml | 41 +++++++++++++++++---------- .github/workflows/release.yml | 24 ++++++++++++++-- .github/workflows/storybook-tests.yml | 20 +++++++++---- .github/workflows/storybook.yml | 19 +++++++++---- 8 files changed, 111 insertions(+), 50 deletions(-) diff --git a/.github/workflows/chromatic.yml b/.github/workflows/chromatic.yml index 2d74fc417..3d590cf5d 100644 --- a/.github/workflows/chromatic.yml +++ b/.github/workflows/chromatic.yml @@ -1,6 +1,6 @@ -name: "Chromatic" +name: "Chromatic Deployment" -# Event for the workflow +# Triggers on Push event on all branches, excluding the 'prod' branch on: push: branches-ignore: @@ -8,25 +8,29 @@ on: jobs: chromatic-deployment: - runs-on: ubuntu-latest + runs-on: ubuntu-latest # Use the latest version of the Ubuntu runner environment steps: + # Step 1: Checkout the repository code - name: Checkout repository uses: actions/checkout@v3 with: fetch-depth: 0 + # Step 2: Set up Node.js environment and cache Yarn dependencies - name: Setup Node.js uses: actions/setup-node@v3 with: - node-version-file: ".node-version" - cache: "yarn" + node-version-file: ".node-version" # Specify the Node.js version from '.node-version' file + cache: "yarn" # Cache Yarn dependencies for faster builds + # Step 3: Install project dependencies using Yarn - name: Install dependencies run: yarn + # Step 4: Publish the project to Chromatic - name: Publish to Chromatic uses: chromaui/action@v1 with: - token: ${{ secrets.GITHUB_TOKEN }} - projectToken: ${{ secrets.CHROMATIC_PROJECT_TOKEN }} + token: ${{ secrets.GITHUB_TOKEN }} # Authenticate using the GitHub token + projectToken: ${{ secrets.CHROMATIC_PROJECT_TOKEN }} # Provide the Chromatic project token for authentication diff --git a/.github/workflows/commitlint.yml b/.github/workflows/commitlint.yml index d55729cba..f389bdddc 100644 --- a/.github/workflows/commitlint.yml +++ b/.github/workflows/commitlint.yml @@ -1,5 +1,6 @@ name: Lint PR commit +# Triggers on pull requests with specific types on: pull_request: types: @@ -10,10 +11,12 @@ on: jobs: main: - runs-on: ubuntu-latest + runs-on: ubuntu-latest # Use the latest version of the Ubuntu runner environment + steps: + # Step 1: Use the 'amannn/action-semantic-pull-request' action to validate the PR commit - uses: amannn/action-semantic-pull-request@v3.4.2 with: - validateSingleCommit: true + validateSingleCommit: true # Specify to validate a single commit env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Authenticate using the GitHub token diff --git a/.github/workflows/github-release.yml b/.github/workflows/github-release.yml index 23ae03ad5..cfc324882 100644 --- a/.github/workflows/github-release.yml +++ b/.github/workflows/github-release.yml @@ -1,22 +1,26 @@ name: Create release +# Triggers on pushes to tags on: push: tags: - - "*" + - "*" # This workflow triggers on any tag push jobs: release: name: Release pushed tag - runs-on: ubuntu-latest + runs-on: ubuntu-latest # Use the latest version of the Ubuntu runner environment + steps: + # Step 1: Debugging step to display a message - name: Debugging step run: echo "Creating GitHub release workflow is running!" + # Step 2: Create a GitHub release - name: Create release env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - tag: ${{ github.ref }} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Authenticate using the GitHub token + tag: ${{ github.ref }} # Get the tag name from the push event run: | gh release create "$tag" \ --repo="$GITHUB_REPOSITORY" \ diff --git a/.github/workflows/namespace-check.yml b/.github/workflows/namespace-check.yml index 385dc1514..013fd3c52 100644 --- a/.github/workflows/namespace-check.yml +++ b/.github/workflows/namespace-check.yml @@ -1,29 +1,35 @@ -# .github/workflows/namespace-check.yml - name: "Namespace Check" + +# Triggers on push event on all branches, excluding the 'prod' branch on: push: branches-ignore: - - prod + - prod # Exclude the 'prod' branch from triggering this workflow jobs: namespace-check: - runs-on: ubuntu-latest + runs-on: ubuntu-latest # Use the latest version of the Ubuntu runner environment + steps: + # Step 1: Check out the repository code - name: Checkout code uses: actions/checkout@v3 + # Step 2: Set up Node.js environment and cache Yarn dependencies - name: Setup Node.js uses: actions/setup-node@v3 with: - node-version-file: ".node-version" - cache: "yarn" + node-version-file: ".node-version" # Specify the Node.js version from '.node-version' file + cache: "yarn" # Cache Yarn dependencies for faster builds + # Step 3: Install project dependencies using Yarn - name: Install dependencies run: yarn + # Step 4: Build the component library in 'dist/' directory - name: Build component library in dist/ run: yarn build + # Step 5: Run the Namespace Checking script - name: Namespace Checking run: yarn namespace-check diff --git a/.github/workflows/push-tests.yml b/.github/workflows/push-tests.yml index b861bbb6e..99cc79d41 100644 --- a/.github/workflows/push-tests.yml +++ b/.github/workflows/push-tests.yml @@ -1,75 +1,86 @@ name: Push Tests +# Workflow event triggers on: push: branches: - - main + - main # Triggered on pushes to the 'main' branch pull_request: - branches: "*" + branches: "*" # Triggered on pull requests for any branch jobs: lint: - runs-on: ubuntu-latest + runs-on: ubuntu-latest # Use the latest version of the Ubuntu runner environment steps: + # Step 1: Check out the repository code - name: Checkout repository uses: actions/checkout@v3 with: fetch-depth: 0 + # Step 2: Set up Node.js environment and cache Yarn dependencies - name: Setup Node.js uses: actions/setup-node@v3 with: - node-version-file: ".node-version" - cache: "yarn" + node-version-file: ".node-version" # Specify the Node.js version from '.node-version' file + cache: "yarn" # Cache Yarn dependencies for faster builds + # Step 3: Install project dependencies using Yarn - name: Install dependencies run: yarn + # Step 4: Build the component library in 'dist/' directory - name: Build component library in dist/ run: yarn build + # Step 5: Run linting - name: Lint - run: | - yarn lint + run: yarn lint test: runs-on: ubuntu-latest steps: + # Step 1: Check out the repository code - name: Checkout repository uses: actions/checkout@v3 with: fetch-depth: 0 + # Step 2: Set up Node.js environment and cache Yarn dependencies - name: Setup Node.js uses: actions/setup-node@v3 with: - node-version-file: ".node-version" - cache: "yarn" + node-version-file: ".node-version" # Specify the Node.js version from '.node-version' file + cache: "yarn" # Cache Yarn dependencies for faster builds + # Step 3: Install project dependencies using Yarn - name: Install dependencies run: yarn + # Step 4: Run tests - name: Test - run: | - yarn test + run: yarn test build: runs-on: ubuntu-latest steps: + # Step 1: Check out the repository code - name: Checkout repository uses: actions/checkout@v3 with: fetch-depth: 0 + # Step 2: Set up Node.js environment and cache Yarn dependencies - name: Setup Node.js uses: actions/setup-node@v3 with: - node-version-file: ".node-version" - cache: "yarn" + node-version-file: ".node-version" # Specify the Node.js version from '.node-version' file + cache: "yarn" # Cache Yarn dependencies for faster builds + # Step 3: Install project dependencies using Yarn - name: Install dependencies run: yarn + # Step 4: Build - name: Build - run: | - yarn build + run: yarn build diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index c2750deeb..50875e3ff 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,4 +1,6 @@ name: Release + +# triggers on pushes to the 'prod' branch on: push: # NOTE(thuang): Since REGEX is not supported for branches, we cannot target @@ -10,47 +12,57 @@ on: jobs: release: name: Release - runs-on: ubuntu-latest + runs-on: ubuntu-latest # Use the latest version of the Ubuntu runner environment + steps: + # Step 1: Check out the repository code - name: Checkout uses: actions/checkout@v3 with: fetch-depth: 0 + # Step 2: Set up Node.js environment and cache Yarn dependencies - name: Setup Node.js and Cache yarn uses: actions/setup-node@v3 with: - node-version-file: ".node-version" - cache: "yarn" + node-version-file: ".node-version" # Specify the Node.js version from '.node-version' file + cache: "yarn" # Cache Yarn dependencies for faster builds + # Step 3: Set up npm and authentication - name: "Setup npm" run: | npm set "//registry.npmjs.org/:_authToken=${NODE_AUTH_TOKEN}" env: NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} + # Step 4: Ensure npm access - name: Ensure NPM access run: npm whoami env: NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} + # Step 5: Install project dependencies using Yarn - name: Install dependencies run: yarn ci + # Step 6: Build the component library in 'dist/' directory - name: Build component library in dist/ run: yarn build + # Step 7: Configure git user for pushing release changes back to prod branch - name: Config git user run: | git config --global user.name "${{ github.actor }}" git config --global user.email "${{ github.actor }}@users.noreply.github.com" + # Step 8: Lerna Version - name: Lerna Version env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} NPM_TOKEN: ${{ secrets.NPM_TOKEN }} run: yarn version:ci + # Step 9: Commit changes - name: Commit changes env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} @@ -58,21 +70,26 @@ jobs: with: branch: ${{ github.head_ref }} + # Step 10: Publish NPM packages - name: Lerna Publish env: NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}} run: yarn publish:ci + # Step 11: Check out the main branch + # to create a pull request to push the release modifications back to the main - name: Checkout main uses: actions/checkout@v3 with: ref: main + # Step 12: Reset promotion branch - name: Reset promotion branch run: | git fetch origin prod:prod git reset --hard prod + # Step 13: Create Pull Request - name: Create Pull Request uses: peter-evans/create-pull-request@v5 with: @@ -83,6 +100,7 @@ jobs: branch: main-promotion base: main + # Step 14: Post breaking changes to a Slack channel - name: Post breaking changes to a Slack channel env: SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} diff --git a/.github/workflows/storybook-tests.yml b/.github/workflows/storybook-tests.yml index 76e7ace86..2b8b01d61 100644 --- a/.github/workflows/storybook-tests.yml +++ b/.github/workflows/storybook-tests.yml @@ -1,39 +1,47 @@ -# .github/workflows/storybook-tests.yml - name: "Storybook Tests" + +# Triggers on push to all branches, excluding the 'prod' branch on: push: branches-ignore: - - prod + - prod # Exclude the 'prod' branch from triggering this workflow jobs: test: timeout-minutes: 60 - runs-on: ubuntu-latest + runs-on: ubuntu-latest # Use the latest version of the Ubuntu runner environment + steps: + # Step 1: Check out the repository code - name: Checkout repository uses: actions/checkout@v3 with: fetch-depth: 0 + # Step 2: Set up Node.js environment and cache Yarn dependencies - name: Setup Node.js uses: actions/setup-node@v3 with: - node-version-file: ".node-version" - cache: "yarn" + node-version-file: ".node-version" # Specify the Node.js version from '.node-version' file + cache: "yarn" # Cache Yarn dependencies for faster builds + # Step 3: Install project dependencies using Yarn - name: Install dependencies run: yarn + # Step 4: Install Playwright for testing - name: Install Playwright run: npx playwright install --with-deps + # Step 5: Build Storybook - name: Build Storybook run: yarn build-storybook --quiet + # Step 6: Run accessibility tests on Storybook - name: Run accessibility tests run: yarn storybook:axeOnly + # Step 7: Serve Storybook and run tests concurrently - name: Serve Storybook and run tests run: | npx concurrently -k -s first -n "SB,TEST" -c "magenta,blue" \ diff --git a/.github/workflows/storybook.yml b/.github/workflows/storybook.yml index a2b72075f..a29dc6670 100644 --- a/.github/workflows/storybook.yml +++ b/.github/workflows/storybook.yml @@ -1,33 +1,40 @@ -# Doc: https://dev.to/kouts/deploy-storybook-to-github-pages-3bij name: Build and Deploy + +# Triggers on pushes to the 'main' branch on: push: branches: - main + jobs: build-and-deploy: - runs-on: ubuntu-latest + runs-on: ubuntu-latest # Use the latest version of the Ubuntu runner environment + steps: + # Step 1: Check out the repository code - name: Checkout repository uses: actions/checkout@v3 with: fetch-depth: 0 + # Step 2: Set up Node.js environment and cache Yarn dependencies - name: Setup Node.js uses: actions/setup-node@v3 with: - node-version-file: ".node-version" - cache: "yarn" + node-version-file: ".node-version" # Specify the Node.js version from '.node-version' file + cache: "yarn" # Cache Yarn dependencies for faster builds + # Step 3: Install npm packages and build the Storybook files - name: Install and Build - run: | # Install npm packages and build the Storybook files + run: | yarn yarn build-storybook + # Step 4: Deploy to GitHub Pages using the 'github-pages-deploy-action' - name: Deploy uses: JamesIves/github-pages-deploy-action@v4 with: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Authenticate using the GitHub token BRANCH: gh-pages # The branch the action should deploy to. FOLDER: docs-build # The folder that the build-storybook script generates files. CLEAN: true # Automatically remove deleted files from the deploy branch From 78950cebe38be8c61272b5f5db0e4dfd3971532f Mon Sep 17 00:00:00 2001 From: Masoud Amjadi Date: Fri, 1 Sep 2023 20:22:31 -0400 Subject: [PATCH 52/60] fix(slack): change Slack Web Hook Url BREAKING CHANGE: This is only for test purposes --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 50875e3ff..54e05232c 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -103,7 +103,7 @@ jobs: # Step 14: Post breaking changes to a Slack channel - name: Post breaking changes to a Slack channel env: - SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} + SLACK_WEBHOOK_URL: ${{ secrets.SDS_BREAKING_CHANGES_SLACK_WEBHOOK }} uses: act10ns/slack@v1 with: status: complete From 53e22758f60c9ede11896e88a9501dde6713a1ed Mon Sep 17 00:00:00 2001 From: Masoud Amjadi Date: Fri, 1 Sep 2023 20:32:18 -0400 Subject: [PATCH 53/60] fix(slack): change slack action config BREAKING CHANGE: This is only for testing purposes. --- .github/workflows/release.yml | 2 +- .github/{ => workflows}/slack-breaking-changes.yml | 0 2 files changed, 1 insertion(+), 1 deletion(-) rename .github/{ => workflows}/slack-breaking-changes.yml (100%) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 54e05232c..b7af3f116 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -108,5 +108,5 @@ jobs: with: status: complete channel: "#sci-design-system-breaking-changes" - config: .github/slack-breaking-changes.yml + config: .github/workflows/slack-breaking-changes.yml if: contains(toJson(github.event.commits.*.message), 'BREAKING CHANGE') diff --git a/.github/slack-breaking-changes.yml b/.github/workflows/slack-breaking-changes.yml similarity index 100% rename from .github/slack-breaking-changes.yml rename to .github/workflows/slack-breaking-changes.yml From 7b739868bf0054c12c110fb5d1e6630f2bbf906b Mon Sep 17 00:00:00 2001 From: Masoud Amjadi Date: Fri, 1 Sep 2023 20:39:33 -0400 Subject: [PATCH 54/60] fix(github): move slack config file to config directory to avoid github errors BREAKING CHANGE: This is only for testing purposes! --- .github/{workflows => config}/slack-breaking-changes.yml | 0 .github/workflows/release.yml | 2 +- 2 files changed, 1 insertion(+), 1 deletion(-) rename .github/{workflows => config}/slack-breaking-changes.yml (100%) diff --git a/.github/workflows/slack-breaking-changes.yml b/.github/config/slack-breaking-changes.yml similarity index 100% rename from .github/workflows/slack-breaking-changes.yml rename to .github/config/slack-breaking-changes.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index b7af3f116..1a1eb9e46 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -108,5 +108,5 @@ jobs: with: status: complete channel: "#sci-design-system-breaking-changes" - config: .github/workflows/slack-breaking-changes.yml + config: .github/config/slack-breaking-changes.yml if: contains(toJson(github.event.commits.*.message), 'BREAKING CHANGE') From 0c6c7365323f328455d2e4179e1e8cee87ca1fff Mon Sep 17 00:00:00 2001 From: Masoud Amjadi Date: Fri, 1 Sep 2023 20:52:15 -0400 Subject: [PATCH 55/60] fix(slack): revert to Default config BREAKING CHANGE: This is only for testing purposes. --- .github/slack.yml | 13 +++++++++++++ .github/workflows/release.yml | 2 -- 2 files changed, 13 insertions(+), 2 deletions(-) create mode 100644 .github/slack.yml diff --git a/.github/slack.yml b/.github/slack.yml new file mode 100644 index 000000000..6edf06098 --- /dev/null +++ b/.github/slack.yml @@ -0,0 +1,13 @@ +pretext: ":warning: {{ actor }} released breaking changes to SDS on the {{ branch }} branch! :warning:" + +text: | + {{#if payload.commits}} + *Commits* + {{#each payload.commits}} + <{{this.url}}|`{{truncate this.id 8}}`> - {{this.message}} + {{/each}} + {{/if}} +footer: >- + <{{repositoryUrl}}|{{repositoryName}}> {{workflow}} #{{runNumber}} +colors: + default: "#7D3C98" diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 1a1eb9e46..e0be2a166 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -107,6 +107,4 @@ jobs: uses: act10ns/slack@v1 with: status: complete - channel: "#sci-design-system-breaking-changes" - config: .github/config/slack-breaking-changes.yml if: contains(toJson(github.event.commits.*.message), 'BREAKING CHANGE') From 47a720c43c6882aa832c2269b188898814c0c2a2 Mon Sep 17 00:00:00 2001 From: Masoud Amjadi Date: Fri, 1 Sep 2023 21:21:54 -0400 Subject: [PATCH 56/60] fix(config): copy slack config file in the Workflows directory BREAKING CHANGE: This is only for testing purposes! --- .github/config/slack-breaking-changes.yml | 13 ------------- .github/workflows/release.yml | 2 ++ .github/{ => workflows}/slack.yml | 0 3 files changed, 2 insertions(+), 13 deletions(-) delete mode 100644 .github/config/slack-breaking-changes.yml rename .github/{ => workflows}/slack.yml (100%) diff --git a/.github/config/slack-breaking-changes.yml b/.github/config/slack-breaking-changes.yml deleted file mode 100644 index 6edf06098..000000000 --- a/.github/config/slack-breaking-changes.yml +++ /dev/null @@ -1,13 +0,0 @@ -pretext: ":warning: {{ actor }} released breaking changes to SDS on the {{ branch }} branch! :warning:" - -text: | - {{#if payload.commits}} - *Commits* - {{#each payload.commits}} - <{{this.url}}|`{{truncate this.id 8}}`> - {{this.message}} - {{/each}} - {{/if}} -footer: >- - <{{repositoryUrl}}|{{repositoryName}}> {{workflow}} #{{runNumber}} -colors: - default: "#7D3C98" diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index e0be2a166..b3d14eb71 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -107,4 +107,6 @@ jobs: uses: act10ns/slack@v1 with: status: complete + channel: "#sci-design-system-breaking-changes" + config: .github/workflows/slack.yml if: contains(toJson(github.event.commits.*.message), 'BREAKING CHANGE') diff --git a/.github/slack.yml b/.github/workflows/slack.yml similarity index 100% rename from .github/slack.yml rename to .github/workflows/slack.yml From a181f7e929a536575c37d68d973c1d98ca865ba8 Mon Sep 17 00:00:00 2001 From: Masoud Amjadi Date: Fri, 1 Sep 2023 21:29:49 -0400 Subject: [PATCH 57/60] fix(slack): fix config directory BREAKING CHANGE: This is for testing purposes only! --- .github/{workflows => config}/slack.yml | 0 .github/workflows/release.yml | 2 +- 2 files changed, 1 insertion(+), 1 deletion(-) rename .github/{workflows => config}/slack.yml (100%) diff --git a/.github/workflows/slack.yml b/.github/config/slack.yml similarity index 100% rename from .github/workflows/slack.yml rename to .github/config/slack.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index b3d14eb71..0beab0553 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -108,5 +108,5 @@ jobs: with: status: complete channel: "#sci-design-system-breaking-changes" - config: .github/workflows/slack.yml + config: .github/config/slack.yml if: contains(toJson(github.event.commits.*.message), 'BREAKING CHANGE') From e2d3a03b16ce7b0b07198a87fc7ed8d6ec1352bd Mon Sep 17 00:00:00 2001 From: Masoud Amjadi Date: Fri, 1 Sep 2023 22:09:04 -0400 Subject: [PATCH 58/60] fix(actions): add a tip on pull request body to help with stucked checks --- .github/workflows/release.yml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 0beab0553..4aa3ecbc1 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -96,7 +96,14 @@ jobs: token: ${{ secrets.GITHUB_TOKEN }} commit-message: "Merge changes from prod to main" title: "chore(release): Merge changes from prod to main" - body: "This pull request merges changes from the prod branch to main after Lerna publish." + body: | + This pull request merges changes from the prod branch to main after Lerna publish. + + ### Tip + + If you have checks that are pending due to the status not being reported, resolving the issue is possible by closing and reopening the PR. This action effectively unsticks the checks, allowing them to run as intended. [This behavior arises from the inherent limitations of GitHub Actions, where one action's execution can't directly trigger another action](https://github.com/peter-evans/create-pull-request/issues/48). + + Thus, techniques like "pushing an empty commit" or "closing and reopening the PR" help unblock the process, making the PR no longer solely reliant on action-triggered events. branch: main-promotion base: main From d0f96f178f38dc6467540398a82a6749e3d446b6 Mon Sep 17 00:00:00 2001 From: Masoud Amjadi Date: Fri, 1 Sep 2023 23:33:14 -0400 Subject: [PATCH 59/60] fix(github): use a DEPLOY_KEY in lerna version Using a DEPLOY_KEY by passes github restriction on triggering workflows from other workflows --- .github/workflows/release.yml | 2 +- packages/components/src/core/Autocomplete/index.stories.tsx | 5 ++++- packages/data-viz/src/core/HeatmapChart/storyUtils.ts | 2 +- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 4aa3ecbc1..03a1d1bfc 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -58,7 +58,7 @@ jobs: # Step 8: Lerna Version - name: Lerna Version env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + ssh-key: "${{ secrets.COMMIT_KEY }}" NPM_TOKEN: ${{ secrets.NPM_TOKEN }} run: yarn version:ci diff --git a/packages/components/src/core/Autocomplete/index.stories.tsx b/packages/components/src/core/Autocomplete/index.stories.tsx index 3fff67ea1..004e2a33c 100644 --- a/packages/components/src/core/Autocomplete/index.stories.tsx +++ b/packages/components/src/core/Autocomplete/index.stories.tsx @@ -61,7 +61,10 @@ const Autocomplete = ( search={search} value={multiple ? pendingValue : value} getOptionDisabled={(option: DefaultAutocompleteOption) => { - return option.name === "Type: feature request"; + return ( + option.name === "Type: feature request" || + option.name === "Type: documentation" + ); }} {...props} /> diff --git a/packages/data-viz/src/core/HeatmapChart/storyUtils.ts b/packages/data-viz/src/core/HeatmapChart/storyUtils.ts index 6dd12660c..a832b0e59 100644 --- a/packages/data-viz/src/core/HeatmapChart/storyUtils.ts +++ b/packages/data-viz/src/core/HeatmapChart/storyUtils.ts @@ -24,7 +24,7 @@ export const COLORS = [ "rgb(128, 128, 128)", "rgb(255, 255, 255)", "rgb(0, 0, 0)", - "rgb(255, 255, 204)", + "rgb(255, 255, 205)", "rgb(204, 255, 255)", "rgb(255, 204, 255)", "rgb(230, 230, 250)", From 7664df06517bb5787f20a5aeabc9ecb0a7c05ed4 Mon Sep 17 00:00:00 2001 From: masoudmanson Date: Sat, 2 Sep 2023 03:39:02 +0000 Subject: [PATCH 60/60] Publish - @czi-sds/components@17.0.1 - @czi-sds/data-viz@0.3.3 --- packages/components/package.json | 2 +- packages/data-viz/package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/components/package.json b/packages/components/package.json index f8d24111b..294572c5b 100644 --- a/packages/components/package.json +++ b/packages/components/package.json @@ -1,6 +1,6 @@ { "name": "@czi-sds/components", - "version": "17.0.0", + "version": "17.0.1", "main": "dist/index.cjs.js", "module": "dist/index.esm.js", "repository": { diff --git a/packages/data-viz/package.json b/packages/data-viz/package.json index 0b2517ef5..7c3877650 100644 --- a/packages/data-viz/package.json +++ b/packages/data-viz/package.json @@ -1,6 +1,6 @@ { "name": "@czi-sds/data-viz", - "version": "0.3.2", + "version": "0.3.3", "main": "dist/index.cjs.js", "module": "dist/index.esm.js", "author": "",