UNPKG

@spectrumsense/spectrum-chat-dev

Version:

Embeddable AI Widget - Add trusted, evidence-based answers directly to your website. Simple installation, enterprise-grade security.

152 lines (101 loc) 3.56 kB
# Should I Publish Manually? A simple decision tree to help you decide. ## ❓ Start Here ### Did you just run `npm run version:bump`? **YES** Go to [Section A](#section-a-you-already-bumped-version) **NO** Go to [Section B](#section-b-version-not-bumped-yet) --- ## Section A: You Already Bumped Version Your `package.json` shows something like `0.1.4-dev.0` ### Question: Do you want to publish RIGHT NOW? #### ✅ YES - I want it published immediately ```bash # Just publish it! npm run publish:develop # Then reset version for future GitHub Actions git checkout package.json git add package.json git commit -m "chore: reset version for CI" git push origin develop ``` **Result**: Package is published in 30 seconds, you're done! 🎉 --- #### ❌ NO - I can wait 2-3 minutes ```bash # Undo the version bump git checkout package.json # Push to trigger GitHub Actions git push origin develop # Wait for GitHub Actions to build and publish ``` **Result**: GitHub Actions handles everything automatically --- ## Section B: Version Not Bumped Yet Your `package.json` shows something like `0.1.3` (no `-dev` suffix) ### Question: Do you have uncommitted changes? #### ✅ YES - I have uncommitted changes **Sub-question: Do you want to test this version RIGHT NOW before pushing?** **YES** Publish manually: ```bash npm run version:bump npm run publish:develop # Test on unpkg, then commit later ``` **NO** Use GitHub Actions: ```bash git add . git commit -m "feat: your changes" git push origin develop # GitHub Actions publishes automatically ``` --- #### ❌ NO - Everything is committed **Question: Is this committed code already on the develop branch?** **YES** GitHub Actions should have already published it Check: https://github.com/spectrumsense/spectrum-chat/actions **NO** Push to develop: ```bash git push origin develop # GitHub Actions will publish automatically ``` --- ## 🎯 Quick Decision Matrix | Situation | Action | Method | |-----------|--------|--------| | Need it NOW, already bumped | `npm run publish:develop` | Manual | | Need it NOW, not bumped | `npm run version:bump && npm run publish:develop` | Manual | | Can wait, already bumped | `git checkout package.json && git push origin develop` | GitHub Actions | | Can wait, not bumped | `git push origin develop` | GitHub Actions | | Just merged PR to develop | Wait or manually trigger workflow | GitHub Actions | --- ## 🚨 Emergency: I Published the Wrong Version! ### If you published manually and it's wrong: ```bash # Unpublish the bad version (within 72 hours) npm unpublish @spectrumsense/spectrum-chat-dev@0.1.4-dev.0 # Fix the issue # ... make changes ... # Publish the corrected version npm run version:bump npm run publish:develop ``` **⚠️ Warning**: Unpublishing is only available for 72 hours and can cause issues for users. ### If GitHub Actions published wrong version: 1. Fix the code in a new branch 2. Create PR to develop 3. Merge PR 4. GitHub Actions publishes new version automatically --- ## 💡 Rule of Thumb **When in doubt, use GitHub Actions:** ```bash git push origin develop ``` It's the safest and most consistent approach. --- ## 📞 Need Help? Check: 1. **GitHub Actions Status**: https://github.com/spectrumsense/spectrum-chat/actions 2. **Published Packages**: https://www.npmjs.com/package/@spectrumsense/spectrum-chat-dev 3. **unpkg CDN**: https://unpkg.com/@spectrumsense/spectrum-chat-dev@latest/ Still stuck? Check `WORKFLOW_GUIDE.md` for detailed explanations.