You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+15-15Lines changed: 15 additions & 15 deletions
Original file line number
Diff line number
Diff line change
@@ -42,7 +42,7 @@ npm test
42
42
43
43
Tired of repetitive setup, inconsistent code, and integration headaches? See how `js-quality-started-with-release` provides a superior foundation compared to starting from scratch or using basic boilerplates.
@@ -133,27 +133,27 @@ This template is built around a fully automated, commit-driven workflow.
133
133
134
134
This project uses `Husky`, `lint-staged`, and `commitlint` to enforce code quality and consistent commit messages.
135
135
136
-
1.**On Staging:** When you stage files (`git add`), `lint-staged` runs formatters (`Prettier`) and linters (`ESLint`, `markdownlint`) on them. This ensures your code and documentation are clean _before_ you even write a commit message.
137
-
2.**On Commit:** When you write a commit message (`git commit`), `commitlint` validates it against the **Conventional Commits** specification. This is the most critical step, as these structured commit messages power the automated release process. If your message is not compliant (e.g., `git commit -m "updated stuff"`), the commit will be aborted.
136
+
1.**On Staging:** When you stage files (`git add`), `lint-staged` runs formatters (`Prettier`) and linters (`ESLint`, `markdownlint`) on them. This ensures your code and documentation are clean _before_ you even write a commit message.
137
+
2.**On Commit:** When you write a commit message (`git commit`), `commitlint` validates it against the **Conventional Commits** specification. This is the most critical step, as these structured commit messages power the automated release process. If your message is not compliant (e.g., `git commit -m "updated stuff"`), the commit will be aborted.
138
138
139
139
### Automated Release Generation
140
140
141
141
This template uses **`semantic-release`** to automate the entire release process. The manual step of deciding on a version number and creating a release is completely removed.
142
142
143
143
The process is triggered every time a commit is merged into the `main` branch. Here’s what happens:
144
144
145
-
1.**Trigger:** A push or merge to the `main` branch starts the `release.yml` GitHub Actions workflow.
146
-
2.**Analysis:**`semantic-release` analyzes the commit messages since the last release.
147
-
3.**Versioning:** It automatically determines the next version number based on the types of commits:
148
-
*`fix:` commits result in a **PATCH** release (e.g., `1.0.0` -> `1.0.1`).
149
-
*`feat:` commits result in a **MINOR** release (e.g., `1.0.1` -> `1.1.0`).
150
-
* Commits with `BREAKING CHANGE:` in the body result in a **MAJOR** release (e.g., `1.1.0` -> `2.0.0`).
151
-
4.**Release Generation:** If a release is warranted, `semantic-release` performs the following actions:
152
-
* Updates `CHANGELOG.md` with the new release notes.
153
-
* Updates the `version` in `package.json`.
154
-
* Creates a new Git tag for the new version.
155
-
* Creates a new GitHub Release with the generated notes.
156
-
* Commits the updated `package.json` and `CHANGELOG.md` files back to the `main` branch.
145
+
1.**Trigger:** A push or merge to the `main` branch starts the `release.yml` GitHub Actions workflow.
146
+
2.**Analysis:**`semantic-release` analyzes the commit messages since the last release.
147
+
3.**Versioning:** It automatically determines the next version number based on the types of commits:
148
+
-`fix:` commits result in a **PATCH** release (e.g., `1.0.0` -> `1.0.1`).
149
+
-`feat:` commits result in a **MINOR** release (e.g., `1.0.1` -> `1.1.0`).
150
+
- Commits with `BREAKING CHANGE:` in the body result in a **MAJOR** release (e.g., `1.1.0` -> `2.0.0`).
151
+
4.**Release Generation:** If a release is warranted, `semantic-release` performs the following actions:
152
+
- Updates `CHANGELOG.md` with the new release notes.
153
+
- Updates the `version` in `package.json`.
154
+
- Creates a new Git tag for the new version.
155
+
- Creates a new GitHub Release with the generated notes.
156
+
- Commits the updated `package.json` and `CHANGELOG.md` files back to the `main` branch.
157
157
158
158
This means you no longer need to manually tag versions. Your release cycle is tied directly to the features and fixes you merge into your main branch.
0 commit comments