|
| 1 | +# Release Guide |
| 2 | + |
| 3 | +This guide explains how to release new versions of the SSH Remote Script Executor action and publish them to GitHub Marketplace. |
| 4 | + |
| 5 | +## Quick Release |
| 6 | + |
| 7 | +Use the provided release script for easy version management: |
| 8 | + |
| 9 | +```bash |
| 10 | +./scripts/release.sh 1.0.0 |
| 11 | +``` |
| 12 | + |
| 13 | +This will: |
| 14 | +- ✅ Validate version format and repository state |
| 15 | +- ✅ Create and push the version tag |
| 16 | +- ✅ Trigger the automated release workflow |
| 17 | +- ✅ Update major version tags (v1, v2, etc.) |
| 18 | + |
| 19 | +## Manual Release Process |
| 20 | + |
| 21 | +### 1. Prepare for Release |
| 22 | + |
| 23 | +Ensure your repository is ready: |
| 24 | + |
| 25 | +```bash |
| 26 | +# Check that all files are present |
| 27 | +ls -la action.yml Dockerfile entrypoint.sh README.md |
| 28 | + |
| 29 | +# Ensure working directory is clean |
| 30 | +git status |
| 31 | + |
| 32 | +# Make sure you're on main branch |
| 33 | +git checkout main |
| 34 | +git pull origin main |
| 35 | +``` |
| 36 | + |
| 37 | +### 2. Create Release Tag |
| 38 | + |
| 39 | +```bash |
| 40 | +# Create and push a semantic version tag |
| 41 | +git tag -a v1.0.0 -m "Release v1.0.0" |
| 42 | +git push origin v1.0.0 |
| 43 | +``` |
| 44 | + |
| 45 | +### 3. Automated Release Workflow |
| 46 | + |
| 47 | +The workflow (`.github/workflows/release.yml`) will automatically: |
| 48 | + |
| 49 | +1. **Validate** - Check that all required files exist |
| 50 | +2. **Test** - Build Docker image to ensure it works |
| 51 | +3. **Release** - Create GitHub release with generated notes |
| 52 | +4. **Tag Management** - Update major version tags (v1, v2, etc.) |
| 53 | + |
| 54 | +### 4. Publish to GitHub Marketplace |
| 55 | + |
| 56 | +After the release is created: |
| 57 | + |
| 58 | +1. **Navigate to your repository** on GitHub |
| 59 | +2. **Go to the main page** and look for the marketplace banner |
| 60 | +3. **Click "Publish this Action to the GitHub Marketplace"** |
| 61 | +4. **Fill in the marketplace details**: |
| 62 | + - Action name: `SSH Remote Script Executor` |
| 63 | + - Description: `Execute scripts on remote hosts via SSH` |
| 64 | + - Categories: `Deployment`, `Utilities` |
| 65 | + - Tags: `ssh`, `remote`, `deployment`, `scripts` |
| 66 | +5. **Submit for publication** |
| 67 | + |
| 68 | +## Version Management |
| 69 | + |
| 70 | +### Semantic Versioning |
| 71 | + |
| 72 | +Follow [Semantic Versioning](https://semver.org/) (MAJOR.MINOR.PATCH): |
| 73 | + |
| 74 | +- **MAJOR** version when you make incompatible API changes |
| 75 | +- **MINOR** version when you add functionality in a backwards compatible manner |
| 76 | +- **PATCH** version when you make backwards compatible bug fixes |
| 77 | + |
| 78 | +### Examples: |
| 79 | +- `v1.0.0` - Initial release |
| 80 | +- `v1.0.1` - Bug fix |
| 81 | +- `v1.1.0` - New feature (backwards compatible) |
| 82 | +- `v2.0.0` - Breaking change |
| 83 | + |
| 84 | +### Major Version Tags |
| 85 | + |
| 86 | +The release workflow automatically maintains major version tags: |
| 87 | +- `v1.0.0` → creates/updates `v1` tag |
| 88 | +- `v1.0.1` → updates `v1` tag |
| 89 | +- `v2.0.0` → creates/updates `v2` tag |
| 90 | + |
| 91 | +This allows users to reference stable major versions: |
| 92 | +```yaml |
| 93 | +uses: your-username/ssh-action@v1 # Always latest v1.x.x |
| 94 | +uses: your-username/ssh-action@v1.0.0 # Specific version |
| 95 | +``` |
| 96 | +
|
| 97 | +## Pre-release Checklist |
| 98 | +
|
| 99 | +Before creating a release: |
| 100 | +
|
| 101 | +- [ ] All tests pass |
| 102 | +- [ ] README is updated with new features |
| 103 | +- [ ] Breaking changes are documented |
| 104 | +- [ ] Version follows semantic versioning |
| 105 | +- [ ] Changelog is updated (if you maintain one) |
| 106 | +- [ ] All required files are present |
| 107 | +- [ ] Docker image builds successfully |
| 108 | +
|
| 109 | +## Release Notes Template |
| 110 | +
|
| 111 | +The workflow generates release notes automatically, but you can customize them: |
| 112 | +
|
| 113 | +```markdown |
| 114 | +## SSH Remote Script Executor v1.0.0 |
| 115 | + |
| 116 | +### What's New |
| 117 | +- New feature descriptions |
| 118 | +- Improvements and enhancements |
| 119 | +- Bug fixes |
| 120 | + |
| 121 | +### Breaking Changes |
| 122 | +- List any breaking changes |
| 123 | + |
| 124 | +### Usage |
| 125 | +```yaml |
| 126 | +- uses: your-username/ssh-action@v1.0.0 |
| 127 | + with: |
| 128 | + host: ${{ secrets.SERVER_HOST }} |
| 129 | + # ... other parameters |
| 130 | +``` |
| 131 | + |
| 132 | +### Migration Guide |
| 133 | +- Instructions for upgrading from previous versions |
| 134 | +``` |
| 135 | +
|
| 136 | +## Troubleshooting |
| 137 | +
|
| 138 | +### Release Workflow Fails |
| 139 | +
|
| 140 | +1. **Check workflow logs** in the Actions tab |
| 141 | +2. **Common issues**: |
| 142 | + - Missing required files |
| 143 | + - Docker build failures |
| 144 | + - Permission issues with `GITHUB_TOKEN` |
| 145 | + |
| 146 | +### Marketplace Publication Issues |
| 147 | + |
| 148 | +1. **Repository must be public** for marketplace publication |
| 149 | +2. **action.yml must have proper branding** (✅ already configured) |
| 150 | +3. **Check GitHub's marketplace requirements** |
| 151 | + |
| 152 | +### Tag Already Exists |
| 153 | + |
| 154 | +```bash |
| 155 | +# Delete local tag |
| 156 | +git tag -d v1.0.0 |
| 157 | +
|
| 158 | +# Delete remote tag |
| 159 | +git push origin --delete v1.0.0 |
| 160 | +
|
| 161 | +# Create new tag |
| 162 | +git tag -a v1.0.0 -m "Release v1.0.0" |
| 163 | +git push origin v1.0.0 |
| 164 | +``` |
| 165 | + |
| 166 | +## GitHub Marketplace Requirements |
| 167 | + |
| 168 | +To publish to GitHub Marketplace, ensure: |
| 169 | + |
| 170 | +1. ✅ Repository is public |
| 171 | +2. ✅ Valid `action.yml` in repository root |
| 172 | +3. ✅ Proper branding in `action.yml` |
| 173 | +4. ✅ Comprehensive README with usage examples |
| 174 | +5. ✅ Valid semantic version tags |
| 175 | +6. ✅ Action actually works (tested) |
| 176 | + |
| 177 | +## Support |
| 178 | + |
| 179 | +For issues with the release process: |
| 180 | +1. Check the workflow logs in the Actions tab |
| 181 | +2. Review this guide |
| 182 | +3. Create an issue in the repository |
| 183 | + |
| 184 | +Happy releasing! 🚀 |
0 commit comments