Skip to content

Commit df0d733

Browse files
authored
chore(release): 2.4.0
2 parents d15c9dd + 113ca81 commit df0d733

File tree

97 files changed

+3850
-470
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

97 files changed

+3850
-470
lines changed

.changeset/blue-dryers-knock.md

Lines changed: 0 additions & 7 deletions
This file was deleted.

.changeset/nine-flowers-hunt.md

Lines changed: 0 additions & 6 deletions
This file was deleted.

.changeset/odd-trains-beg.md

Lines changed: 0 additions & 7 deletions
This file was deleted.

.changeset/quiet-vans-give.md

Lines changed: 0 additions & 10 deletions
This file was deleted.
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: Create changelog changesets
2+
on:
3+
push:
4+
branches:
5+
- v2-release/**
6+
7+
jobs:
8+
create-changelog:
9+
name: Create changelog
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: Checkout code
13+
uses: actions/checkout@v3
14+
- name: Install Node.js
15+
uses: actions/setup-node@v3
16+
with:
17+
node-version-file: '.node-version'
18+
cache: 'yarn'
19+
- name: Install dependencies
20+
run: yarn --immutable
21+
- name: Extract version number from branch name
22+
id: version_number
23+
run: |
24+
branchName=${{ github.ref }}
25+
echo "result=${branchName##*/}" >> $GITHUB_OUTPUT
26+
- name: Create PR with changelog
27+
uses: changesets/action@v1
28+
with:
29+
commit: 'ci: version packages'
30+
title: 'ci: version packages v${{ steps.version_number.outputs.result }}'
31+
env:
32+
# Needs access to publish to npm
33+
# refresh token before Saturday, May 25, 2024
34+
NPM_TOKEN: ${{ secrets.NPM_RELEASE_TOKEN }}
35+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/cd-v2-automerge.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: Helper - Auto-merge PR with `automerge` label
2+
on:
3+
pull_request:
4+
types:
5+
- opened
6+
- labeled
7+
- reopened
8+
- synchronize
9+
- ready_for_review
10+
- edited
11+
branches:
12+
- v2-develop
13+
14+
jobs:
15+
automerge:
16+
runs-on: ubuntu-latest
17+
if: ${{ startsWith(github.head_ref, 'v2' )}}
18+
steps:
19+
- name: Checkout repo
20+
uses: actions/checkout@v3
21+
- id: automerge
22+
name: automerge
23+
uses: 'pascalgn/automerge-action@v0.15.6'
24+
env:
25+
GITHUB_TOKEN: '${{ secrets.GITHUB_TOKEN }}'
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: Publish prod version and create sync PR
2+
on:
3+
push:
4+
branches:
5+
- v2
6+
7+
jobs:
8+
publish-and-create-pr:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- name: Checkout repo
12+
uses: actions/checkout@v3
13+
- name: Install Node.js
14+
uses: actions/setup-node@v3
15+
with:
16+
node-version-file: '.node-version'
17+
cache: 'yarn'
18+
registry-url: 'https://registry.npmjs.org'
19+
- name: Install dependencies
20+
run: yarn --immutable
21+
- name: Publish Production version
22+
# run: yarn changeset publish
23+
run: echo publish package
24+
env:
25+
# Needs access to publish to npm
26+
# refresh token before Saturday, May 25, 2024
27+
NPM_TOKEN: ${{ secrets.NPM_RELEASE_TOKEN }}
28+
NODE_AUTH_TOKEN: ${{ secrets.NPM_RELEASE_TOKEN }}
29+
- name: Create PR to develop
30+
env:
31+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
32+
run: |
33+
gh pr create -B v2-develop --title 'chore: automatic Sync v2->v2-develop PR' --body 'This Pull Request is generated automatically with changes pushed into `v2` branch. `v2` and `v2-develop` branches should be in-sync.' --label automerge || true
34+
- name: Merge created PR
35+
env:
36+
GH_TOKEN: ${{ github.token }}
37+
run: gh pr merge --auto --merge

.github/workflows/ci.yml

Lines changed: 28 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ on:
44
branches:
55
- v2
66
- v2-develop
7+
- '!changeset-release/**'
78
pull_request:
89
types:
910
- opened
@@ -12,6 +13,10 @@ on:
1213
- ready_for_review
1314
- edited
1415

16+
env:
17+
SONAR_TOKEN_REACT: ${{ secrets.SONAR_TOKEN_REACT }}
18+
SONAR_TOKEN_VUE: ${{ secrets.SONAR_TOKEN_VUE }}
19+
1520
jobs:
1621
cache:
1722
name: Create cache for all steps
@@ -27,22 +32,6 @@ jobs:
2732
- name: Install dependencies
2833
run: NOT_GENERATE_ICON=true && yarn --immutable
2934

30-
verify-collaborator:
31-
name: Verify collaborator
32-
needs: [cache]
33-
runs-on: ubuntu-latest
34-
outputs:
35-
isCollaborator: ${{ steps.collaborator.outputs.isCollaborator }}
36-
steps:
37-
- id: collaborator
38-
name: Check if user is a collaborator
39-
run: |
40-
curl -s -H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" \
41-
"https://api.github.com/repos/${{ github.repository }}/collaborators/${{ github.actor }}" \
42-
| grep -q "Collaborator not found" \
43-
&& echo "isCollaborator=false" >> $GITHUB_OUTPUT \
44-
|| echo "isCollaborator=true" >> $GITHUB_OUTPUT
45-
4635
commit-lint:
4736
name: Validate PR Title (conventional-commit)
4837
needs: [cache]
@@ -131,7 +120,7 @@ jobs:
131120

132121
cypress-vue:
133122
name: Run cypress tests(Vue)
134-
needs: [cache, lint, verify-collaborator]
123+
needs: [cache, lint]
135124
runs-on: ubuntu-latest
136125
steps:
137126
- name: Checkout
@@ -158,7 +147,7 @@ jobs:
158147
- name: Post-Cypress (generate coverage)
159148
run: cd apps/test/vue; yarn generate-coverage
160149
- name: SonarCloud Scan
161-
if: ${{ needs.verify-collaborator.outputs.isCollaborator == 'true' && (success() || failure()) }}
150+
if: ${{ env.SONAR_TOKEN_VUE }}
162151
uses: SonarSource/sonarcloud-github-action@v1.9
163152
with:
164153
projectBaseDir: packages/sfui/frameworks/vue
@@ -168,7 +157,7 @@ jobs:
168157

169158
cypress-react:
170159
name: Run cypress tests(React)
171-
needs: [cache, lint, verify-collaborator]
160+
needs: [cache, lint]
172161
runs-on: ubuntu-latest
173162
steps:
174163
- name: Checkout
@@ -193,7 +182,7 @@ jobs:
193182
- name: Post-Cypress (generate coverage)
194183
run: cd apps/test/react; yarn generate-coverage
195184
- name: SonarCloud Scan
196-
if: ${{ needs.verify-collaborator.outputs.isCollaborator == 'true' && (success() || failure()) }}
185+
if: ${{ env.SONAR_TOKEN_REACT }}
197186
uses: SonarSource/sonarcloud-github-action@v1.9
198187
with:
199188
projectBaseDir: packages/sfui/frameworks/react
@@ -232,18 +221,31 @@ jobs:
232221
NPM_TOKEN: ${{ secrets.NPM_RELEASE_TOKEN }}
233222
NODE_AUTH_TOKEN: ${{ secrets.NPM_RELEASE_TOKEN }}
234223

235-
release-next:
236-
name: Release release candidate
224+
release-rc:
225+
name: Release RC package
237226
runs-on: ubuntu-latest
238227
steps:
239228
- name: Checkout code
240229
uses: actions/checkout@v3
241230
with:
242231
ref: ${{ github.event.pull_request.head.sha }}
232+
- name: Install Node.js
233+
uses: actions/setup-node@v3
234+
with:
235+
node-version-file: '.node-version'
236+
cache: 'yarn'
237+
registry-url: 'https://registry.npmjs.org'
238+
- name: Install dependencies
239+
run: yarn --immutable
243240
- name: Save head commit message
244241
id: commit_message
245242
run: echo "result=$(git log -1 --pretty=%s)" >> $GITHUB_OUTPUT
246-
- name: Publish release-candidate
247-
# If this is any `v2-release/**` branch AND last commit is made by changeset action and its commit message is with "rc" suffix, logic can be found in "release-changeset-changelog.yml
248-
if: ${{ startsWith( github.ref, 'refs/heads/v2-release' ) && steps.commit_message.output.result == '[ci] - release rc' }}
249-
run: echo "Publish now"
243+
- name: Publish release-candidate version
244+
# If this is any `v2-release/**` branch AND last commit is made by changeset action and its commit message is with "ci: release (rc)", this happens only after merging changesets changelog PR
245+
if: "${{ startsWith( github.event.pull_request.head.ref, 'v2-release' ) && contains( steps.commit_message.outputs.result, 'ci: version packages (rc)' ) }}"
246+
run: yarn changeset publish
247+
env:
248+
# Needs access to publish to npm
249+
# refresh token before Saturday, May 25, 2024
250+
NPM_TOKEN: ${{ secrets.NPM_RELEASE_TOKEN }}
251+
NODE_AUTH_TOKEN: ${{ secrets.NPM_RELEASE_TOKEN }}

.github/workflows/exit-pre-mode-on-comment.yml

Lines changed: 0 additions & 44 deletions
This file was deleted.

.github/workflows/release-changeset-changelog.yml

Lines changed: 0 additions & 47 deletions
This file was deleted.

.github/workflows/speedcurve-perf-test.yml

Lines changed: 0 additions & 20 deletions
This file was deleted.

0 commit comments

Comments
 (0)