From 8259f3154f85d80d3d07c8cc52158dde1a3ed549 Mon Sep 17 00:00:00 2001 From: "haifeng.li" Date: Thu, 20 Jun 2024 17:19:09 -0700 Subject: [PATCH] chore: convert commitlint config to mjs --- CONTRIBUTING.md | 14 +++++++------- commitlint.config.js => commitlint.config.mjs | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) rename commitlint.config.js => commitlint.config.mjs (96%) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index efe8346..cabe363 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -74,18 +74,18 @@ Issues labelled `good first contribution`. ### Branching Strategy: -- **Main Branch**: Ongoing development and new features are submitted to the main branch. +- **Main Branch**: Ongoing development and new features are submitted to the `main` branch. -- **Release Branch**: We'll utilize a dedicated branch for managing releases +- **Release Branches**: We'll utilize dedicated branches for managing releases. - **Major Release:** - - Create a new branch named `release-\*` (e.g., `release-2`) from `main` to manage the release process. - - Update the `.releaserc.yml` file: Locate the `branches` property and specify the newly created release branch name (e.g., `release-2`). + - Create a new branch named `release-` (e.g., `release-2` for a `2.0` release) from `main` to manage the release process. + - Update the `.releaserc.json` file: Locate the `branches` property and specify the newly created release branch name (e.g., `release-2`). - **Minor/Patch Release:** - - If a release branch for a major version already exists (e.g., `release-2`), we can use it for subsequent minor and patch releases. - - Hot fixes are merged in release branch, and will be merged back to `main` once it is verified. + - We will use existing major release branches (e.g. `release-2`) for subsequent minor and patch releases (e.g. `2.0.1`, `2.1.2`, etc.). + - Once changes are verified and merged into the release branch, they will be merged back to `main`. -- **Trigger Release Manually:**: +- **Trigger Release Manually:** - Navigate to the `Actions` tab in GitHub repository. - Select the `release` workflow from the left sidebar. - Click the `Run workflow` button to initiate the release process. diff --git a/commitlint.config.js b/commitlint.config.mjs similarity index 96% rename from commitlint.config.js rename to commitlint.config.mjs index 459c7a7..ac66659 100644 --- a/commitlint.config.js +++ b/commitlint.config.mjs @@ -9,7 +9,7 @@ const automaticCommitPattern = /^chore\(release\):.*\[skip ci\]/; /** @type {import('@commitlint/types').UserConfig} */ -module.exports = { +export default { extends: ['@commitlint/config-conventional'], ignores: [(commitMsg) => automaticCommitPattern.test(commitMsg)] };