This document describes the process for creating and publishing a new release of Copilot-Liku CLI.
- All planned features/fixes are merged to
main - All tests are passing
- Documentation is up to date
- changelog.md is updated with release notes
- No known critical bugs
Update the version in package.json using npm:
# For a patch release (bug fixes): 0.0.1 -> 0.0.2
npm version patch
# For a minor release (new features): 0.0.1 -> 0.1.0
npm version minor
# For a major release (breaking changes): 0.0.1 -> 1.0.0
npm version majorThis will:
- Update
package.json - Create a git commit
- Create a git tag
Edit changelog.md to document all changes:
## 0.0.15 - Liku Edition - 2026-XX-XX
### Added
- New CLI commands for automation
### Changed
- Improved error handling
### Fixed
- Fixed issue with PATH on Windows# Push the commit and tag
git push origin main
git push origin --tags- Go to https://github.com/TayDa64/copilot-Liku-cli/releases/new
- Select the tag you just created (e.g.,
v0.0.15) - Set release title:
v0.0.15 - Liku Edition - Copy release notes from changelog
- Mark as pre-release if beta/alpha
- Click "Publish release"
gh release create v1.0.0 \
--title "v1.0.0 - Release Name" \
--notes-file RELEASE_NOTES.mdOnce the release is published on GitHub:
- The
publish-npm.ymlworkflow will automatically trigger - It will run tests
- Verify package contents
- Publish to npm with
NPM_TOKENsecret - Comment on the release with install instructions
After the workflow completes:
# Check on npm
npm view copilot-liku-cli
# Test installation
npm install -g copilot-liku-cli@latest
liku --version
# Verify it's the correct version- Announce release on relevant channels
- Update project board/issues
- Monitor for bug reports
- Respond to user feedback
For bug fixes and minor updates:
npm version patch
git push origin main --tagsFor new features (backwards compatible):
npm version minor
git push origin main --tagsFor breaking changes:
npm version major
git push origin main --tagsFor testing before official release:
npm version prerelease --preid=beta
npm publish --tag beta
git push origin main --tagsUsers can install with:
npm install -g copilot-liku-cli@betaFor urgent fixes to a released version:
- Create a hotfix branch from the tag:
git checkout -b hotfix/v1.0.1 v1.0.0-
Make the fix and commit
-
Bump version:
npm version patch-
Create PR and merge to main
-
Create release as normal
If a release has critical issues:
# Deprecate the broken version
npm deprecate copilot-liku-cli@1.0.0 "Critical bug, use 1.0.1 instead"
# Release a fix
npm version patch
# ... follow normal release process# Only use within 24 hours of publish
npm unpublish copilot-liku-cli@1.0.0Use this template for release notes:
# v1.0.0 - Major Feature Release
## 🎉 What's New
- **Feature 1**: Description of new feature
- **Feature 2**: Description of another feature
## 🐛 Bug Fixes
- Fixed issue with X (#123)
- Resolved Y problem (#456)
## 📚 Documentation
- Updated installation guide
- Added examples for new features
## 💥 Breaking Changes
- Changed command `old` to `new` (migration guide: link)
- Removed deprecated feature X
## 🔧 Dependencies
- Updated electron to v35.7.5
- Updated other-package to v2.0.0
## 📦 Installation
```bash
npm install -g copilot-liku-cliThank you to everyone who contributed to this release!
- @contributor1
- @contributor2
## Automation Setup
### Required Secrets
Add these to GitHub repository secrets:
1. **NPM_TOKEN**: npm access token for publishing
- Create at: https://www.npmjs.com/settings/YOUR-USERNAME/tokens
- Type: Automation token
- Scope: Read and write
### Workflow Triggers
The publish workflow triggers on:
- **Release published**: Automatic on GitHub release
- **Manual dispatch**: Via Actions tab for testing
## Troubleshooting
### Workflow Fails
Check:
- NPM_TOKEN is set correctly
- Version isn't already published
- Tests are passing
- Package builds successfully
### Version Already Published
If you need to republish:
1. Increment version: `npm version patch`
2. Push and create new release
### Permission Errors
Ensure:
- NPM_TOKEN has publish permissions
- Token hasn't expired
- Package name isn't taken by someone else
## Best Practices
1. **Test before releasing**: Always test on a local or beta channel first
2. **Semantic versioning**: Follow semver strictly
3. **Changelog maintenance**: Keep detailed release notes
4. **Deprecation warnings**: Give users advance notice of breaking changes
5. **Security updates**: Prioritize and release quickly
6. **Communication**: Announce releases to users
## Resources
- [Semantic Versioning](https://semver.org/)
- [GitHub Releases](https://docs.github.com/en/repositories/releasing-projects-on-github)
- [npm Publishing](https://docs.npmjs.com/cli/v10/commands/npm-publish)
- [GitHub Actions](https://docs.github.com/en/actions)