Skip to content

Commit 64231a1

Browse files
authored
Use npm version for release workflow (#90) (#100)
1 parent 37ef564 commit 64231a1

1 file changed

Lines changed: 7 additions & 6 deletions

File tree

resources/project/common/prj-version-control-standard.md

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -160,21 +160,22 @@ Production releases are created exclusively via tags on the main branch.
160160

161161
**Tag Naming Convention:** `vX.Y.Z` (e.g., `v1.0.0`, `v2.3.1`)
162162

163-
**Manual Release Process:**
163+
**Release Process (npm projects):**
164164
1. Ensure you are on main branch: `git checkout main`
165165
2. Pull latest: `git pull`
166166
3. Verify clean working directory: `git status`
167-
4. Verify tests pass
168-
5. Update version in project files (e.g., `package.json`)
169-
6. Commit version bump: `git commit -am "vX.Y.Z"`
170-
7. Create annotated tag: `git tag -a vX.Y.Z -m "vX.Y.Z"`
171-
8. Push commit and tag: `git push && git push --tags`
167+
4. Run tests: `npm test`
168+
5. Bump version, commit, and tag atomically: `npm version patch` (or `minor`/`major`)
169+
6. Push commit and tag: `git push && git push --tags`
170+
171+
**Why `npm version`:** Handles version bump, commit, and tag atomically—fewer manual steps, less error-prone.
172172

173173
**Rules:**
174174
- Tags are immutable — never delete or move a release tag
175175
- Only tag from main branch
176176
- Version bump commit should contain only version changes
177177
- Use annotated tags (`-a`), not lightweight tags
178+
- For non-npm projects, use equivalent tooling or manual steps
178179

179180
---
180181

0 commit comments

Comments
 (0)