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
This document outlines the process for publishing the ACCESS Q&A Bot package to npm.
3
+
This document outlines the simplified process for publishing the ACCESS Q&A Bot package to npm.
4
4
5
5
## Version Management
6
6
@@ -39,31 +39,28 @@ git tag -l "v0.3.0"
39
39
npm login
40
40
```
41
41
42
-
## Release Process
42
+
## Standard Release Process
43
43
44
-
Our release process is designed to work with our existing CDN infrastructure and includes release candidate testing for integration with dependent repositories (like access-ci-ui). The process allows for testing integration BEFORE opening a PR to ensure end-to-end functionality.
44
+
This is the main workflow for releasing new versions of the package.
45
45
46
-
### 1. Feature Development (Including Release Candidate Version)
47
-
48
-
During feature development:
46
+
### 1. Feature Development
49
47
50
48
```bash
51
49
# Create feature branch from main
52
50
git checkout -b feature/my-feature main
53
51
54
-
# Make changes, commit them
52
+
# Make your changes, commit them
55
53
# ...
56
54
57
55
# Check existing versions before updating
58
56
git tag -l "v*"
59
57
60
-
# Update version in package.json with rc suffix (manually edit)
61
-
# Example: "1.1.0-rc.1"
58
+
# Update version in package.json (manually edit)
59
+
# Example: "1.1.0"
62
60
# IMPORTANT: Choose a NEW version that doesn't have an existing git tag
63
61
# This is necessary for our CDN links to work correctly
64
62
65
63
# Sync package-lock.json with new version
66
-
# NOTE: This ensures package-lock.json matches package.json version
67
64
npm install
68
65
69
66
# Build the library and app for both npm and CDN delivery
@@ -72,123 +69,85 @@ npm run build
72
69
73
70
# Commit the version change and builds
74
71
git add .
75
-
git commit -am "Bump version to X.Y.Z-rc.1"
72
+
git commit -am "Bump version to X.Y.Z"
76
73
```
77
74
78
-
### 2. Publish Release Candidate from Feature Branch (Before PR)
79
-
80
-
Publish the release candidate version for integration testing BEFORE opening the PR:
75
+
### 2. Test the Package (Optional)
81
76
82
77
```bash
83
-
# From your feature branch (not main yet)
84
-
git checkout npm-release
85
-
git merge feature/my-feature # Merge your feature branch to npm-release
86
-
# Resolve any conflicts if needed
87
-
88
-
# Test the package
78
+
# Test the package locally
89
79
npm pack
90
80
tar -tf @snf-access-qa-bot-*.tgz
91
81
92
-
# Publish release candidate to npm with rc tag
93
-
npm publish --tag rc --access public
94
-
95
-
# Push changes to npm-release branch
96
-
git push upstream npm-release
97
-
98
-
# Return to your feature branch
99
-
git checkout feature/my-feature
100
-
```
101
-
102
-
### 3. Integration Testing
103
-
104
-
Test the release candidate version with dependent repositories:
105
-
106
-
```bash
107
-
# In access-ci-ui or other consuming repos
108
-
npm install @snf/access-qa-bot@rc
109
-
110
-
# Test integration thoroughly
111
-
# Document any issues or successful tests
82
+
# Clean up the test file
83
+
rm @snf-access-qa-bot-*.tgz
112
84
```
113
85
114
-
### 4. Open Pull Request
115
-
116
-
Now that integration testing is complete, open the PR:
86
+
### 3. Open Pull Request
117
87
118
88
- Create PR from `feature/my-feature` to `main`
119
-
- Include integration test results in PR description
120
-
- Note that RC version has been published and tested
121
-
- Reviewers can be confident the changes work end-to-end
122
-
123
-
### 5. Merge to Main
89
+
- Include description of changes
90
+
- Get code review and approval
124
91
125
-
Once PR is approved and merged to main, the feature branch changes are now in main.
92
+
### 4. Merge to Main
126
93
127
-
### 6. Promote to Stable Release
94
+
Once PR is approved and merged to main, proceed with the release.
128
95
129
-
After successful PR merge, promote the release candidate to a stable release:
96
+
### 5. Create Release
130
97
131
98
```bash
132
99
# Switch to main and pull latest
133
100
git checkout main
134
101
git pull upstream main
135
102
136
-
# Update version in package.json to remove rc suffix
137
-
# Example: "1.1.0-rc.1" becomes "1.1.0"
138
-
139
-
# Sync package-lock.json with new version
140
-
# NOTE: This ensures package-lock.json matches package.json version
141
-
npm install
142
-
143
-
# Build the library and app for both npm and CDN delivery
144
-
npm run build:lib
145
-
npm run build
146
-
147
-
# Commit the stable version and builds
148
-
git add .
149
-
git commit -am "Release version X.Y.Z"
150
-
151
-
# Create git tag and GitHub release
103
+
# Create git tag and push it
152
104
git tag -a vX.Y.Z -m "Release version X.Y.Z"# Match your actual version
153
105
git push upstream vX.Y.Z
154
106
155
107
# Create GitHub release
156
108
```
157
-
- Click on the "Releases" tab in the GitHub repository
158
-
- Click "Draft a new release"
159
-
- Select the tag you just created
109
+
110
+
#### GitHub Release Steps:
111
+
- Go to: https://github.com/necyberteam/qa-bot/releases/new
112
+
- Select the tag you just created (vX.Y.Z)
160
113
- Add a title and description
161
114
- Click "Publish release"
162
115
116
+
### 6. Publish to npm
117
+
163
118
```bash
164
-
# Update npm-release branch with stable version
119
+
# Update npm-release branch with latest main
165
120
git checkout npm-release
166
121
git merge main
122
+
# Resolve any conflicts if needed
167
123
168
-
# Publish stable version to npm
124
+
# Publish to npm
169
125
npm publish --access public
170
126
171
-
# Push final changes
127
+
# Push npm-release branch
172
128
git push upstream npm-release
173
129
```
174
130
175
-
### 7. Cleanup (Optional)
131
+
##Debug Release Workflow
176
132
177
-
If desired, you can remove the RC tag from npm after stable release:
133
+
For quick debug releases during development (publishes to npm only, no git tags or GitHub releases):
178
134
179
135
```bash
180
-
#Remove the rc tag (optional)
181
-
npm dist-tag rm @snf/access-qa-bot rc
182
-
```
136
+
#From any local branch
137
+
# Update version (e.g., 2.6.0-debug.0 to 2.6.0-debug.1)
138
+
npm version 2.6.0-debug.1
183
139
184
-
### Alternative: Direct Release (Skip Release Candidate)
140
+
# Build the library
141
+
npm run build:lib
185
142
186
-
For smaller changes or when integration testing isn't needed:
143
+
# Publish with debug tag
144
+
npm publish --tag debug --access public
145
+
```
187
146
188
-
1. Use stable version number (no rc suffix) from the start
189
-
2. Build the library and app: `npm run build:lib && npm run build`
190
-
3. Follow steps 1-2 above (including the build and commit steps)
191
-
4. Skip to step 5 (Create tag, GitHub release, and publish to npm)
147
+
This workflow is useful for:
148
+
- Quick iterations during development
149
+
- Testing specific versions in integration environments
150
+
- Publishing debug versions without affecting the main release process
0 commit comments