Skip to content

Commit f8c8672

Browse files
committed
Simplify publishing workflow and add convenient GitHub release link
- Remove complex RC (release candidate) process - Streamline to standard feature branch -> PR -> release workflow - Add direct link to GitHub releases page for convenience - Add cleanup step for npm pack .tgz files - Add AI assistant notes for better tooling support
1 parent 62931b8 commit f8c8672

File tree

1 file changed

+50
-101
lines changed

1 file changed

+50
-101
lines changed

publishing.md

Lines changed: 50 additions & 101 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# @snf/access-qa-bot Publishing Guide
22

3-
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.
44

55
## Version Management
66

@@ -39,31 +39,28 @@ git tag -l "v0.3.0"
3939
npm login
4040
```
4141

42-
## Release Process
42+
## Standard Release Process
4343

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.
4545

46-
### 1. Feature Development (Including Release Candidate Version)
47-
48-
During feature development:
46+
### 1. Feature Development
4947

5048
```bash
5149
# Create feature branch from main
5250
git checkout -b feature/my-feature main
5351

54-
# Make changes, commit them
52+
# Make your changes, commit them
5553
# ...
5654

5755
# Check existing versions before updating
5856
git tag -l "v*"
5957

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"
6260
# IMPORTANT: Choose a NEW version that doesn't have an existing git tag
6361
# This is necessary for our CDN links to work correctly
6462

6563
# Sync package-lock.json with new version
66-
# NOTE: This ensures package-lock.json matches package.json version
6764
npm install
6865

6966
# Build the library and app for both npm and CDN delivery
@@ -72,123 +69,85 @@ npm run build
7269

7370
# Commit the version change and builds
7471
git add .
75-
git commit -am "Bump version to X.Y.Z-rc.1"
72+
git commit -am "Bump version to X.Y.Z"
7673
```
7774

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)
8176

8277
```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
8979
npm pack
9080
tar -tf @snf-access-qa-bot-*.tgz
9181

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
11284
```
11385

114-
### 4. Open Pull Request
115-
116-
Now that integration testing is complete, open the PR:
86+
### 3. Open Pull Request
11787

11888
- 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
12491

125-
Once PR is approved and merged to main, the feature branch changes are now in main.
92+
### 4. Merge to Main
12693

127-
### 6. Promote to Stable Release
94+
Once PR is approved and merged to main, proceed with the release.
12895

129-
After successful PR merge, promote the release candidate to a stable release:
96+
### 5. Create Release
13097

13198
```bash
13299
# Switch to main and pull latest
133100
git checkout main
134101
git pull upstream main
135102

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
152104
git tag -a vX.Y.Z -m "Release version X.Y.Z" # Match your actual version
153105
git push upstream vX.Y.Z
154106

155107
# Create GitHub release
156108
```
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)
160113
- Add a title and description
161114
- Click "Publish release"
162115

116+
### 6. Publish to npm
117+
163118
```bash
164-
# Update npm-release branch with stable version
119+
# Update npm-release branch with latest main
165120
git checkout npm-release
166121
git merge main
122+
# Resolve any conflicts if needed
167123

168-
# Publish stable version to npm
124+
# Publish to npm
169125
npm publish --access public
170126

171-
# Push final changes
127+
# Push npm-release branch
172128
git push upstream npm-release
173129
```
174130

175-
### 7. Cleanup (Optional)
131+
## Debug Release Workflow
176132

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):
178134

179135
```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
183139

184-
### Alternative: Direct Release (Skip Release Candidate)
140+
# Build the library
141+
npm run build:lib
185142

186-
For smaller changes or when integration testing isn't needed:
143+
# Publish with debug tag
144+
npm publish --tag debug --access public
145+
```
187146

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
192151

193152
## Maintaining the Release Branch
194153

@@ -247,22 +206,12 @@ npm install @snf/access-qa-bot
247206

248207
For more detailed usage instructions and examples, refer to the README.md file.
249208

250-
## Simple Debug Releases Workflow
209+
## AI Assistant Notes
251210

252-
For quick debug releases during development:
211+
This workflow is designed to be clear and actionable for AI assistants. Key points:
253212

254-
```bash
255-
# Update version (e.g., 2.6.0-debug.0 to 2.6.0-debug.1)
256-
npm version 2.6.0-debug.1
257-
258-
# Build the library
259-
npm run build:lib
260-
261-
# Publish with debug tag
262-
npm publish --tag debug --access public
263-
```
264-
265-
This workflow is useful for:
266-
- Quick iterations during development
267-
- Testing specific versions in integration environments
268-
- Publishing debug versions without affecting the main release process
213+
- Always check existing git tags before choosing a version number
214+
- Build commands are: `npm run build:lib && npm run build`
215+
- The process maintains both npm packages and CDN links
216+
- 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

0 commit comments

Comments
 (0)