This directory contains automated workflows for the QA Assistant plugin development and deployment process.
Triggers: Push to main/develop, Pull Requests to main
Jobs:
- Code Quality & Security: Runs Plugin Check, validates code
- Build: Creates production-ready plugin ZIP
- Test Matrix: Tests on PHP 7.4, 8.0, 8.1, 8.2
Artifacts:
- Plugin Check results
- Production build ZIP
- Build directory
Triggers: PR opened/updated on main/develop
Jobs:
- Quick Validation: File structure, plugin header, version consistency
- Security Check: PHP syntax, basic security scan
- Plugin Check: WordPress Plugin Check validation
- PR Comment: Posts results summary to PR
Triggers: Git tags matching v* (e.g., v1.0.0)
Jobs:
- Create GitHub Release: Validates version, creates release with changelog
- Upload Assets: Attaches plugin ZIP and build archive
Triggers: GitHub release published
Jobs:
- Deploy: Final validation, creates production build, deploys to WordPress.org
- Upload Assets: Adds release asset to GitHub
-
Feature Development:
git checkout -b feature/new-feature # Make changes git push origin feature/new-feature # Create PR → Triggers pr-check.yml
-
Code Review:
- PR checks run automatically
- Review results in PR comments
- Fix any issues before merging
-
Release Process:
# Update version in qa-assistant.php, readme.txt git tag v1.0.1 git push origin v1.0.1 # Triggers release.yml → Creates GitHub release # Then triggers deploy.yml → Deploys to WordPress.org
Add these secrets in GitHub repository settings:
SVN_USERNAME=your-wordpress-org-username
SVN_PASSWORD=your-wordpress-org-password
Recommended branch protection rules for main:
- ✅ Require status checks to pass
- ✅ Require branches to be up to date
- ✅ Required status checks:
Code Quality & SecurityQuick ValidationWordPress Plugin Check
Add these to your main README.md:
[](https://github.com/username/qa-assistant/actions)
[](https://github.com/username/qa-assistant/actions)Edit ci.yml matrix strategy:
strategy:
matrix:
php-version: ['7.4', '8.0', '8.1', '8.2', '8.3']Add steps to pr-check.yml:
- name: Custom Check
run: |
# Your custom validationEdit deploy.yml for custom deployment logic:
- name: Custom Deploy Step
run: |
# Your deployment commands-
Plugin Check Failures:
- Check for unescaped output
- Verify input sanitization
- Ensure proper nonce verification
-
Version Mismatch:
- Ensure version consistency across:
qa-assistant.phpheaderreadme.txtstable tag- Class constant
- Ensure version consistency across:
-
Deployment Failures:
- Verify SVN credentials
- Check WordPress.org plugin slug
- Ensure clean production build
Enable debug logging:
env:
ACTIONS_STEP_DEBUG: true
ACTIONS_RUNNER_DEBUG: true-
Version Management:
- Use semantic versioning (1.0.0)
- Keep versions synchronized
- Tag releases properly
-
Security:
- Never commit credentials
- Use repository secrets
- Validate all inputs
-
Testing:
- Test on multiple PHP versions
- Validate before deployment
- Use staging environments
-
Documentation:
- Update changelog
- Document breaking changes
- Maintain clear commit messages