# π Release Setup Complete!
Your Autotask MCP Server is now ready for automated releases! Here's what has been set up:
## β
What's Been Created
### GitHub Actions Workflows
- **`.github/workflows/release.yml`** - Main release automation
- Tests on Node.js 18, 20, 22
- Creates GitHub releases with semantic-release
- Publishes to NPM (when configured)
- Builds and pushes Docker images to Docker Hub
- Runs security scans with Trivy
- **`.github/workflows/test.yml`** - Pull request testing
- Comprehensive testing on multiple Node.js versions
- Code quality checks and coverage
- Docker build testing
### Release Configuration
- **`.releaserc.json`** - Semantic release configuration
- Supports main, next, beta, alpha branches
- Automated changelog generation
- GitHub release creation
- NPM publishing integration
### Docker Setup
- **Enhanced Dockerfile** - Production-ready containerization
- Multi-stage builds for optimization
- Multi-architecture support (amd64/arm64)
- Security hardening with non-root user
- Comprehensive OCI labels
- Health checks
- **`src/wrapper.js`** - Docker container wrapper
- Proper signal handling for containers
- Graceful shutdown management
- Error handling and logging
### Documentation & Scripts
- **`RELEASE_SETUP.md`** - Complete release documentation
- **`DOCKER_USAGE.md`** - Comprehensive Docker usage guide
- **`scripts/prepare-release.sh`** - Release preparation script
- **`RELEASE_SUMMARY.md`** - This summary document
### Package Updates
- Added semantic-release dependencies to `package.json`
- Updated TypeScript types with proper `projectType` field
## π§ Required Setup Steps
### 1. GitHub Repository Secrets
Add these secrets in your GitHub repository (`Settings > Secrets and variables > Actions`):
| Secret | Required | Description |
|--------|----------|-------------|
| `GITHUB_TOKEN` | β
Auto | Automatically provided |
| `NPM_TOKEN` | πΆ Optional | For NPM publishing |
| `DOCKERHUB_USERNAME` | β
Required | Your Docker Hub username (`asachs01`) |
| `DOCKERHUB_TOKEN` | β
Required | Docker Hub access token |
### 2. Docker Hub Token Setup
1. Go to [hub.docker.com](https://hub.docker.com/)
2. Navigate to Account Settings > Security
3. Create New Access Token with Read/Write permissions
4. Add as `DOCKERHUB_TOKEN` secret in GitHub
### 3. NPM Token Setup (Optional)
1. Go to [npmjs.com](https://www.npmjs.com/)
2. Account Settings > Access Tokens
3. Generate **Automation** token
4. Add as `NPM_TOKEN` secret in GitHub
## π How to Release
### Automated Release (Recommended)
1. **Develop**: Make changes on feature branches
2. **PR**: Create pull request to `main`
3. **Merge**: Use conventional commit messages:
```bash
feat: add new functionality # Minor version bump
fix: resolve bug in API # Patch version bump
feat!: breaking API change # Major version bump
```
4. **Automatic**: GitHub Actions handles the rest!
### Manual Release Preparation
```bash
# Run the preparation script
./scripts/prepare-release.sh
# If all checks pass, commit and push
git add .
git commit -m "feat: prepare for release"
git push origin main
```
## π¦ What Gets Published
### GitHub Releases
- β
Automated release notes
- β
Version tags (e.g., `v1.0.2`)
- β
Distribution files as assets
### Docker Hub Images
- β
`asachs01/autotask-mcp:latest`
- β
`asachs01/autotask-mcp:v1.0.2`
- β
Multi-architecture (AMD64 + ARM64)
- β
Comprehensive metadata labels
### NPM Package (Optional)
- πΆ `autotask-mcp` package
- πΆ Automated version management
## π Monitoring Releases
### GitHub Actions
- Check the **Actions** tab for workflow status
- Review logs for any failures
- Security scan results in **Security** tab
### Docker Hub
- Visit: https://hub.docker.com/r/asachs01/autotask-mcp
- Verify image tags and metadata
- Check download statistics
### NPM (if enabled)
- Visit: https://www.npmjs.com/package/autotask-mcp
- Verify version and download stats
## π Using Released Images
### Quick Start with Docker
```bash
# Pull the latest image
docker pull asachs01/autotask-mcp:latest
# Run with environment variables
docker run -d \
--name autotask-mcp \
-e AUTOTASK_USERNAME="your-user@company.com" \
-e AUTOTASK_SECRET="your-secret" \
-e AUTOTASK_INTEGRATION_CODE="your-code" \
asachs01/autotask-mcp:latest
```
### Docker Compose
```yaml
services:
autotask-mcp:
image: asachs01/autotask-mcp:latest
environment:
- AUTOTASK_USERNAME=${AUTOTASK_USERNAME}
- AUTOTASK_SECRET=${AUTOTASK_SECRET}
- AUTOTASK_INTEGRATION_CODE=${AUTOTASK_INTEGRATION_CODE}
restart: unless-stopped
```
## π Security Features
- β
**Trivy Scanning**: Automatic vulnerability detection
- β
**Multi-stage Builds**: Minimal attack surface
- β
**Non-root User**: Container security hardening
- β
**Secret Management**: Secure credential handling
- β
**Dependency Scanning**: Regular security updates
## π Next Steps
1. **Set up secrets** in your GitHub repository
2. **Test the workflow** by making a small change and pushing to main
3. **Monitor the release** in GitHub Actions
4. **Verify Docker images** are published to Docker Hub
5. **Update documentation** with your specific Docker Hub username
## π Troubleshooting
If releases fail:
1. **Check GitHub Actions logs** for detailed error messages
2. **Verify secrets** are correctly set in repository settings
3. **Run preparation script** locally to test build/test issues
4. **Review release documentation** for common solutions
For detailed troubleshooting, see:
- [RELEASE_SETUP.md](RELEASE_SETUP.md) - Complete setup guide
- [DOCKER_USAGE.md](DOCKER_USAGE.md) - Docker-specific help
## π Success Indicators
Your release setup is working when you see:
- β
GitHub Actions workflows completing successfully
- β
New releases appearing in GitHub Releases tab
- β
Docker images published to Docker Hub
- β
Security scans completing without critical issues
- β
Proper version tagging following semantic versioning
**Your autotask-mcp server is now ready for production deployment!** π
---
*Based on patterns from [autotask-node](https://github.com/asachs01/autotask-node) repository*