Skip to content

Commit 3417fff

Browse files
benelanjcfranco
authored andcommitted
ci: update github actions for new rc base branch (#8122)
**Related Issue:** #7526 ## Summary Updates the pull request CI to also run when the base branch is `rc`, which will be used for installing breaking changes prior to a major version release.
1 parent 142f258 commit 3417fff

File tree

8 files changed

+56
-14
lines changed

8 files changed

+56
-14
lines changed

.github/workflows/chromatic.yml renamed to .github/workflows/chromatic-main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: "Chromatic"
1+
name: "Chromatic - Main"
22
on:
33
push:
44
branches: [main]

.github/workflows/chromatic-rc.yml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: "Chromatic - RC"
2+
on:
3+
push:
4+
branches: [rc]
5+
pull_request:
6+
branches: [rc]
7+
types: [labeled, synchronize]
8+
jobs:
9+
run:
10+
if: |
11+
(github.event.action == 'labeled' && github.event.label.name == 'pr ready for visual snapshots') || github.event_name == 'push'
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@v3
15+
with:
16+
fetch-depth: 0
17+
- uses: actions/setup-node@v3
18+
with:
19+
node-version-file: package.json
20+
- run: npm install
21+
- run: npm --workspace="packages/calcite-design-tokens" run build
22+
- name: Publish to Chromatic
23+
uses: chromaui/action@v1
24+
with:
25+
projectToken: ${{ secrets.CHROMATIC_PROJECT_TOKEN }}
26+
zip: true
27+
exitOnceUploaded: true
28+
autoAcceptChanges: rc
29+
workingDir: packages/calcite-components
30+
env:
31+
STORYBOOK_SCREENSHOT_TEST_BUILD: true
32+
CHROMATIC_DIFF_THRESHOLD: ${{ secrets.CHROMATIC_DIFF_THRESHOLD }}
33+
skip:
34+
if: contains(github.event.pull_request.labels.*.name, 'skip visual snapshots')
35+
runs-on: ubuntu-latest
36+
steps:
37+
- name: Skip Chromatic
38+
uses: Sibz/github-status-action@v1
39+
with:
40+
authToken: ${{ secrets.GITHUB_TOKEN }}
41+
context: UI Tests
42+
description: Chromatic run skipped
43+
state: success
44+
sha: ${{github.event.pull_request.head.sha || github.sha}}

.github/workflows/codeql-analysis.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@ name: "CodeQL"
1313

1414
on:
1515
push:
16-
branches: [main]
16+
branches: [main, rc]
1717
pull_request:
1818
# The branches below must be a subset of the branches above
19-
branches: [main]
19+
branches: [main, rc]
2020
schedule:
2121
- cron: "19 2 * * 4"
2222

.github/workflows/pr-bot.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name: PR Bot
22
on:
33
pull_request:
4-
branches: [main]
4+
branches: [main, rc]
55
permissions:
66
pull-requests: write
77
issues: write

.github/workflows/pr-e2e.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name: E2E
22
on:
33
pull_request:
4-
branches: [main]
4+
branches: [main, rc]
55
jobs:
66
e2e:
77
runs-on: ubuntu-20.04

.github/workflows/pr-milestone.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name: PR Merged
22
on:
33
pull_request:
4-
branches: [main]
4+
branches: [main, rc]
55
types: [closed]
66
jobs:
77
milestone:

.github/workflows/pr-tests_eslint-plugin-calcite-components.yml

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,11 @@ name: Run eslint-plugin-calcite-components tests
22

33
on:
44
pull_request:
5-
paths:
6-
- "packages/eslint-plugin-calcite-components/**"
7-
branches:
8-
- master
5+
paths: ["packages/eslint-plugin-calcite-components/**"]
6+
branches: [main, rc]
97
push:
10-
paths:
11-
- "packages/eslint-plugin-calcite-components/**"
12-
branches:
13-
- master
8+
paths: ["packages/eslint-plugin-calcite-components/**"]
9+
branches: [main, rc]
1410

1511
jobs:
1612
build:

package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,10 @@
1111
"clean": "turbo run clean --log-order=stream && rimraf node_modules",
1212
"lint": "turbo run lint --log-order=stream",
1313
"publish:next": "lerna publish from-package --dist-tag next --yes",
14+
"publish:rc": "lerna publish from-package --dist-tag rc --yes",
1415
"publish:latest": "lerna publish from-package --yes",
1516
"version:next": "lerna version --conventional-prerelease --preid next --no-git-tag-version --no-push --yes && npm run util:sync-linked-package-versions",
17+
"version:rc": "lerna version --conventional-prerelease --preid rc --no-git-tag-version --no-push --yes && npm run util:sync-linked-package-versions",
1618
"version:latest": "lerna version --conventional-commits --create-release github --no-git-tag-version --no-push --yes && npm run util:sync-linked-package-versions",
1719
"prepare": "husky install",
1820
"preversion": "npm run util:is-in-sync-with-origin && npm run util:is-working-tree-clean",

0 commit comments

Comments
 (0)