Skip to content

Commit 704c9d7

Browse files
committed
fix: add semantic versioning plugin to register the package
1 parent 5cd9e1a commit 704c9d7

File tree

5 files changed

+8750
-2256
lines changed

5 files changed

+8750
-2256
lines changed

.github/workflows/release.yml

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

.releaserc.json

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"branches": ["main"],
3+
"plugins": [
4+
"@semantic-release/commit-analyzer",
5+
"@semantic-release/release-notes-generator",
6+
"@semantic-release/npm",
7+
"@semantic-release/github"
8+
]
9+
}

CONTRIBUTING.md

Lines changed: 22 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,7 @@ constructor(options?: ClientOptions) {
8989
1. Have an npm account
9090
2. Be a member of the @lazydynamics organization
9191
3. Have the necessary permissions to publish packages
92+
4. Have a GitHub token with `repo` scope (for semantic-release)
9293

9394
### Publishing Steps
9495
1. Login to npm:
@@ -101,16 +102,31 @@ constructor(options?: ClientOptions) {
101102
npm run build
102103
```
103104

104-
3. Publish the package:
105+
3. Make a release:
105106
```bash
106-
npm publish
107+
npm run release
107108
```
109+
This will:
110+
- Determine the next version number based on commit messages
111+
- Update package.json
112+
- Create a git tag
113+
- Publish to npm
114+
- Create a GitHub release
108115

109116
### Version Management
110-
Use semantic versioning for releases:
111-
- `npm version patch` for bug fixes
112-
- `npm version minor` for new features
113-
- `npm version major` for breaking changes
117+
The project uses semantic-release for automated version management. Version numbers are determined by commit messages:
118+
- `fix:` commits trigger patch releases (1.0.0 → 1.0.1)
119+
- `feat:` commits trigger minor releases (1.0.0 → 1.1.0)
120+
- Commits with `BREAKING CHANGE:` trigger major releases (1.0.0 → 2.0.0)
121+
122+
Example commit messages:
123+
```bash
124+
git commit -m "fix: handle null values in response"
125+
git commit -m "feat: add support for custom headers"
126+
git commit -m "feat: add new API endpoint
127+
128+
BREAKING CHANGE: remove deprecated method"
129+
```
114130

115131
## Code Style and Guidelines
116132

0 commit comments

Comments
 (0)