@@ -51,31 +51,13 @@ git checkout -b feature/my-feature main
51
51
52
52
# Make your changes, commit them
53
53
# ...
54
-
55
- # Check existing versions before updating
56
- git tag -l " v*"
57
-
58
- # Update version in package.json (manually edit)
59
- # Example: "1.1.0"
60
- # IMPORTANT: Choose a NEW version that doesn't have an existing git tag
61
- # This is necessary for our CDN links to work correctly
62
-
63
- # Sync package-lock.json with new version
64
- npm install
65
-
66
- # Build the library and app for both npm and CDN delivery
67
- npm run build:lib
68
- npm run build
69
-
70
- # Commit the version change and builds
71
- git add .
72
- git commit -am " Bump version to X.Y.Z"
54
+ # DO NOT update version numbers yet - this happens after merge
73
55
```
74
56
75
57
### 2. Test the Package (Optional)
76
58
77
59
``` bash
78
- # Test the package locally
60
+ # Test the package locally (without version changes)
79
61
npm pack
80
62
tar -tf @snf-access-qa-bot-* .tgz
81
63
@@ -88,19 +70,46 @@ rm @snf-access-qa-bot-*.tgz
88
70
- Create PR from ` feature/my-feature ` to ` main `
89
71
- Include description of changes
90
72
- Get code review and approval
73
+ - ** Note** : PR should NOT include version bumps
91
74
92
75
### 4. Merge to Main
93
76
94
77
Once PR is approved and merged to main, proceed with the release.
95
78
96
- ### 5. Create Release
79
+ ### 5. Prepare Release (Post-Merge)
97
80
98
81
``` bash
99
- # Switch to main and pull latest
82
+ # Switch to main and pull latest changes (including your merged PR)
100
83
git checkout main
101
84
git pull upstream main
102
85
103
- # Create git tag and push it
86
+ # Check existing versions before updating
87
+ git tag -l " v*"
88
+
89
+ # Update version in package.json (manually edit)
90
+ # Example: "2.6.4"
91
+ # IMPORTANT: Choose a NEW version that doesn't have an existing git tag
92
+ # This is necessary for our CDN links to work correctly
93
+
94
+ # Sync package-lock.json with new version
95
+ npm install
96
+
97
+ # Build the library and app for both npm and CDN delivery
98
+ npm run build:lib
99
+ npm run build
100
+
101
+ # Commit the version change and builds
102
+ git add .
103
+ git commit -am " Bump version to X.Y.Z"
104
+
105
+ # Push the version bump to main
106
+ git push upstream main
107
+ ```
108
+
109
+ ### 6. Create Git Tag and GitHub Release
110
+
111
+ ``` bash
112
+ # Create git tag and push it (version should already be committed)
104
113
git tag -a vX.Y.Z -m " Release version X.Y.Z" # Match your actual version
105
114
git push upstream vX.Y.Z
106
115
@@ -113,7 +122,7 @@ git push upstream vX.Y.Z
113
122
- Add a title and description
114
123
- Click "Publish release"
115
124
116
- ### 6 . Publish to npm
125
+ ### 7 . Publish to npm
117
126
118
127
``` bash
119
128
# Update npm-release branch with latest main
@@ -210,8 +219,17 @@ For more detailed usage instructions and examples, refer to the README.md file.
210
219
211
220
This workflow is designed to be clear and actionable for AI assistants. Key points:
212
221
222
+ - ** Version bump timing** : Always happens AFTER PR merge, on main branch
223
+ - ** Feature PRs** : Should NOT include version bumps - focus on feature changes only
213
224
- Always check existing git tags before choosing a version number
214
225
- Build commands are: ` npm run build:lib && npm run build `
215
226
- The process maintains both npm packages and CDN links
216
227
- Debug releases use the ` --tag debug ` flag and don't create git tags
217
- - Clean up temporary files (like .tgz from npm pack) after testing
228
+ - Clean up temporary files (like .tgz from npm pack) after testing
229
+
230
+ ### If Version Bump Gets Missed
231
+ If a PR is merged without version bump (old workflow), simply:
232
+ 1 . Update version on main after merge
233
+ 2 . Build and commit
234
+ 3 . Proceed with tagging and release
235
+ This is actually the preferred approach.
0 commit comments