Skip to content

Commit

Permalink
chore(release): 2.4.0
Browse files Browse the repository at this point in the history
  • Loading branch information
FRSgit authored Jun 23, 2023
2 parents d15c9dd + 113ca81 commit df0d733
Show file tree
Hide file tree
Showing 97 changed files with 3,850 additions and 470 deletions.
7 changes: 0 additions & 7 deletions .changeset/blue-dryers-knock.md

This file was deleted.

6 changes: 0 additions & 6 deletions .changeset/nine-flowers-hunt.md

This file was deleted.

7 changes: 0 additions & 7 deletions .changeset/odd-trains-beg.md

This file was deleted.

10 changes: 0 additions & 10 deletions .changeset/quiet-vans-give.md

This file was deleted.

35 changes: 35 additions & 0 deletions .github/workflows/cd-generate-changelog-changeset.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Create changelog changesets
on:
push:
branches:
- v2-release/**

jobs:
create-changelog:
name: Create changelog
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Install Node.js
uses: actions/setup-node@v3
with:
node-version-file: '.node-version'
cache: 'yarn'
- name: Install dependencies
run: yarn --immutable
- name: Extract version number from branch name
id: version_number
run: |
branchName=${{ github.ref }}
echo "result=${branchName##*/}" >> $GITHUB_OUTPUT
- name: Create PR with changelog
uses: changesets/action@v1
with:
commit: 'ci: version packages'
title: 'ci: version packages v${{ steps.version_number.outputs.result }}'
env:
# Needs access to publish to npm
# refresh token before Saturday, May 25, 2024
NPM_TOKEN: ${{ secrets.NPM_RELEASE_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
25 changes: 25 additions & 0 deletions .github/workflows/cd-v2-automerge.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Helper - Auto-merge PR with `automerge` label
on:
pull_request:
types:
- opened
- labeled
- reopened
- synchronize
- ready_for_review
- edited
branches:
- v2-develop

jobs:
automerge:
runs-on: ubuntu-latest
if: ${{ startsWith(github.head_ref, 'v2' )}}
steps:
- name: Checkout repo
uses: actions/checkout@v3
- id: automerge
name: automerge
uses: 'pascalgn/[email protected]'
env:
GITHUB_TOKEN: '${{ secrets.GITHUB_TOKEN }}'
37 changes: 37 additions & 0 deletions .github/workflows/cd-v2-publish-and-create-pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Publish prod version and create sync PR
on:
push:
branches:
- v2

jobs:
publish-and-create-pr:
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v3
- name: Install Node.js
uses: actions/setup-node@v3
with:
node-version-file: '.node-version'
cache: 'yarn'
registry-url: 'https://registry.npmjs.org'
- name: Install dependencies
run: yarn --immutable
- name: Publish Production version
# run: yarn changeset publish
run: echo publish package
env:
# Needs access to publish to npm
# refresh token before Saturday, May 25, 2024
NPM_TOKEN: ${{ secrets.NPM_RELEASE_TOKEN }}
NODE_AUTH_TOKEN: ${{ secrets.NPM_RELEASE_TOKEN }}
- name: Create PR to develop
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
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
- name: Merge created PR
env:
GH_TOKEN: ${{ github.token }}
run: gh pr merge --auto --merge
54 changes: 28 additions & 26 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ on:
branches:
- v2
- v2-develop
- '!changeset-release/**'
pull_request:
types:
- opened
Expand All @@ -12,6 +13,10 @@ on:
- ready_for_review
- edited

env:
SONAR_TOKEN_REACT: ${{ secrets.SONAR_TOKEN_REACT }}
SONAR_TOKEN_VUE: ${{ secrets.SONAR_TOKEN_VUE }}

jobs:
cache:
name: Create cache for all steps
Expand All @@ -27,22 +32,6 @@ jobs:
- name: Install dependencies
run: NOT_GENERATE_ICON=true && yarn --immutable

verify-collaborator:
name: Verify collaborator
needs: [cache]
runs-on: ubuntu-latest
outputs:
isCollaborator: ${{ steps.collaborator.outputs.isCollaborator }}
steps:
- id: collaborator
name: Check if user is a collaborator
run: |
curl -s -H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" \
"https://api.github.com/repos/${{ github.repository }}/collaborators/${{ github.actor }}" \
| grep -q "Collaborator not found" \
&& echo "isCollaborator=false" >> $GITHUB_OUTPUT \
|| echo "isCollaborator=true" >> $GITHUB_OUTPUT
commit-lint:
name: Validate PR Title (conventional-commit)
needs: [cache]
Expand Down Expand Up @@ -131,7 +120,7 @@ jobs:

cypress-vue:
name: Run cypress tests(Vue)
needs: [cache, lint, verify-collaborator]
needs: [cache, lint]
runs-on: ubuntu-latest
steps:
- name: Checkout
Expand All @@ -158,7 +147,7 @@ jobs:
- name: Post-Cypress (generate coverage)
run: cd apps/test/vue; yarn generate-coverage
- name: SonarCloud Scan
if: ${{ needs.verify-collaborator.outputs.isCollaborator == 'true' && (success() || failure()) }}
if: ${{ env.SONAR_TOKEN_VUE }}
uses: SonarSource/[email protected]
with:
projectBaseDir: packages/sfui/frameworks/vue
Expand All @@ -168,7 +157,7 @@ jobs:

cypress-react:
name: Run cypress tests(React)
needs: [cache, lint, verify-collaborator]
needs: [cache, lint]
runs-on: ubuntu-latest
steps:
- name: Checkout
Expand All @@ -193,7 +182,7 @@ jobs:
- name: Post-Cypress (generate coverage)
run: cd apps/test/react; yarn generate-coverage
- name: SonarCloud Scan
if: ${{ needs.verify-collaborator.outputs.isCollaborator == 'true' && (success() || failure()) }}
if: ${{ env.SONAR_TOKEN_REACT }}
uses: SonarSource/[email protected]
with:
projectBaseDir: packages/sfui/frameworks/react
Expand Down Expand Up @@ -232,18 +221,31 @@ jobs:
NPM_TOKEN: ${{ secrets.NPM_RELEASE_TOKEN }}
NODE_AUTH_TOKEN: ${{ secrets.NPM_RELEASE_TOKEN }}

release-next:
name: Release release candidate
release-rc:
name: Release RC package
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.head.sha }}
- name: Install Node.js
uses: actions/setup-node@v3
with:
node-version-file: '.node-version'
cache: 'yarn'
registry-url: 'https://registry.npmjs.org'
- name: Install dependencies
run: yarn --immutable
- name: Save head commit message
id: commit_message
run: echo "result=$(git log -1 --pretty=%s)" >> $GITHUB_OUTPUT
- name: Publish release-candidate
# 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
if: ${{ startsWith( github.ref, 'refs/heads/v2-release' ) && steps.commit_message.output.result == '[ci] - release rc' }}
run: echo "Publish now"
- name: Publish release-candidate version
# 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
if: "${{ startsWith( github.event.pull_request.head.ref, 'v2-release' ) && contains( steps.commit_message.outputs.result, 'ci: version packages (rc)' ) }}"
run: yarn changeset publish
env:
# Needs access to publish to npm
# refresh token before Saturday, May 25, 2024
NPM_TOKEN: ${{ secrets.NPM_RELEASE_TOKEN }}
NODE_AUTH_TOKEN: ${{ secrets.NPM_RELEASE_TOKEN }}
44 changes: 0 additions & 44 deletions .github/workflows/exit-pre-mode-on-comment.yml

This file was deleted.

47 changes: 0 additions & 47 deletions .github/workflows/release-changeset-changelog.yml

This file was deleted.

20 changes: 0 additions & 20 deletions .github/workflows/speedcurve-perf-test.yml

This file was deleted.

Loading

0 comments on commit df0d733

Please sign in to comment.