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
refactor(workflow): simplify NPM publish for automation tokens only (#44)
Simplify auto-publish workflow to use NPM automation tokens exclusively
- Remove OTP support and conditional logic for 2FA
- Streamline publish commands for automation token usage
- Update error messages with automation token specific guidance
- Clarify that workflow expects NPM_TOKEN to be an automation token
This change assumes the repository uses NPM automation tokens which bypass 2FA
and don't require OTP codes, making the publishing process fully automated.
echo "🔐 Using NPM automation token (bypasses 2FA)"
269
271
270
272
if [[ "$VERSION_TYPE" == "major" ]]; then
271
273
echo "⚠️ Publishing MAJOR version $NEW_VERSION"
@@ -375,15 +377,23 @@ jobs:
375
377
The automatic publication process failed. Please check the [workflow logs](https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}) for details.
376
378
377
379
### 🔧 Common Solutions
378
-
- Verify NPM_TOKEN is valid and has publish permissions
379
-
- Check if version already exists
380
-
- Ensure all tests pass locally
381
-
- Verify build process completes successfully
380
+
- **NPM Token**: Verify NPM_TOKEN is valid and has publish permissions
381
+
- **Automation Token**: Ensure you're using an NPM automation token (bypasses 2FA)
382
+
- **Token Permissions**: Check that the token has publish permissions for this package
383
+
- **Version Conflict**: Check if version already exists in NPM
384
+
- **Build Issues**: Ensure all tests pass locally and build completes successfully
385
+
386
+
### 🔐 NPM Token Requirements
387
+
1. **Type**: Must be an "Automation" token from npmjs.com
388
+
2. **Scope**: Should have access to publish the package
389
+
3. **Permissions**: Must have publish permissions
390
+
4. **Secret**: Should be stored as NPM_TOKEN in repository secrets
382
391
383
392
### 📞 Next Steps
384
-
1. Fix the issue based on the error logs
385
-
2. Create a new PR with the same changes
386
-
3. Or use manual publish workflow if urgent`;
393
+
1. Verify NPM_TOKEN is an automation token with correct permissions
394
+
2. Check the error logs for specific authentication issues
0 commit comments