Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: update github actions for new rc base branch #8122

Merged
merged 3 commits into from
Nov 4, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: "Chromatic"
name: "Chromatic - Main"
on:
push:
branches: [main]
Expand Down
44 changes: 44 additions & 0 deletions .github/workflows/chromatic-rc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: "Chromatic - RC"
on:
push:
branches: [rc]
pull_request:
branches: [rc]
types: [labeled, synchronize]
jobs:
run:
if: |
(github.event.action == 'labeled' && github.event.label.name == 'pr ready for visual snapshots') || github.event_name == 'push'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: actions/setup-node@v3
with:
node-version-file: package.json
- run: npm install
- run: npm --workspace="packages/calcite-design-tokens" run build
- name: Publish to Chromatic
uses: chromaui/action@v1
with:
projectToken: ${{ secrets.CHROMATIC_PROJECT_TOKEN }}
zip: true
exitOnceUploaded: true
autoAcceptChanges: rc
workingDir: packages/calcite-components
env:
STORYBOOK_SCREENSHOT_TEST_BUILD: true
CHROMATIC_DIFF_THRESHOLD: ${{ secrets.CHROMATIC_DIFF_THRESHOLD }}
skip:
if: contains(github.event.pull_request.labels.*.name, 'skip visual snapshots')
runs-on: ubuntu-latest
steps:
- name: Skip Chromatic
uses: Sibz/github-status-action@v1
with:
authToken: ${{ secrets.GITHUB_TOKEN }}
context: UI Tests
description: Chromatic run skipped
state: success
sha: ${{github.event.pull_request.head.sha || github.sha}}
4 changes: 2 additions & 2 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ name: "CodeQL"

on:
push:
branches: [main]
branches: [main, rc]
pull_request:
# The branches below must be a subset of the branches above
branches: [main]
branches: [main, rc]
schedule:
- cron: "19 2 * * 4"

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pr-bot.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: PR Bot
on:
pull_request:
branches: [main]
branches: [main, rc]
permissions:
pull-requests: write
issues: write
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pr-e2e.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: E2E
on:
pull_request:
branches: [main]
branches: [main, rc]
jobs:
e2e:
runs-on: ubuntu-20.04
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pr-milestone.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: PR Merged
on:
pull_request:
branches: [main]
branches: [main, rc]
types: [closed]
jobs:
milestone:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,11 @@ name: Run eslint-plugin-calcite-components tests

on:
pull_request:
paths:
- "packages/eslint-plugin-calcite-components/**"
branches:
- master
paths: ["packages/eslint-plugin-calcite-components/**"]
branches: [main, rc]
push:
paths:
- "packages/eslint-plugin-calcite-components/**"
branches:
- master
paths: ["packages/eslint-plugin-calcite-components/**"]
branches: [main, rc]

jobs:
build:
Expand Down
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,10 @@
"clean": "turbo run clean --log-order=stream && rimraf node_modules",
"lint": "turbo run lint --log-order=stream",
"publish:next": "lerna publish from-package --dist-tag next --yes",
"publish:rc": "lerna publish from-package --dist-tag rc --yes",
"publish:latest": "lerna publish from-package --yes",
"version:next": "lerna version --conventional-prerelease --preid next --no-git-tag-version --no-push --yes && npm run util:sync-linked-package-versions",
"version:rc": "lerna version --conventional-prerelease --preid rc --no-git-tag-version --no-push --yes && npm run util:sync-linked-package-versions",
"version:latest": "lerna version --conventional-commits --create-release github --no-git-tag-version --no-push --yes && npm run util:sync-linked-package-versions",
"prepare": "husky install",
"preversion": "npm run util:is-in-sync-with-origin && npm run util:is-working-tree-clean",
Expand Down