|
| 1 | +--- |
| 2 | +description: 'Connect Java plugin release process and versioning workflow' |
| 3 | +--- |
| 4 | + |
| 5 | +# Connect Java Release Process |
| 6 | + |
| 7 | +This rule documents the complete release workflow for Connect Java plugins across all platforms (Velocity, BungeeCord, Spigot/Paper). |
| 8 | + |
| 9 | +## Current Release Configuration |
| 10 | + |
| 11 | +- **Release Branch**: `connect` |
| 12 | +- **Current Version**: Check [build.gradle.kts](mdc:build.gradle.kts) line 9 |
| 13 | +- **Platforms**: Velocity, BungeeCord, Spigot/Paper |
| 14 | +- **Automation**: GitHub Actions via [release.yml](mdc:.github/workflows/release.yml) |
| 15 | + |
| 16 | +## Release Artifacts |
| 17 | + |
| 18 | +Each release produces these platform-specific JARs: |
| 19 | + |
| 20 | +- **`connect-spigot.jar`** - For Spigot/Paper servers |
| 21 | +- **`connect-velocity.jar`** - For Velocity proxy |
| 22 | +- **`connect-bungee.jar`** - For BungeeCord proxy |
| 23 | + |
| 24 | +Built via shadow plugin configuration in [connect.shadow-conventions.gradle.kts](mdc:build-logic/src/main/kotlin/connect.shadow-conventions.gradle.kts). |
| 25 | + |
| 26 | +## Release Types |
| 27 | + |
| 28 | +### 1. Versioned Release (Tag-based) |
| 29 | + |
| 30 | +**Trigger**: Push git tag matching `*.*.*` pattern |
| 31 | +**Creates**: |
| 32 | + |
| 33 | +- GitHub release with tag name (e.g., `0.7.0`) |
| 34 | +- JARs named `connect-{platform}-{version}.jar` |
| 35 | +- Updates `latest` release tag |
| 36 | +- Standard JARs named `connect-{platform}.jar` |
| 37 | + |
| 38 | +### 2. Pre-release (Branch-based) |
| 39 | + |
| 40 | +**Trigger**: Push to `connect` branch without tag |
| 41 | +**Creates**: |
| 42 | + |
| 43 | +- GitHub pre-release with `latest-prerelease` tag |
| 44 | +- JARs named `connect-{platform}-prerelease.jar` |
| 45 | + |
| 46 | +## Step-by-Step Release Process |
| 47 | + |
| 48 | +### 1. Pre-Release Checks |
| 49 | + |
| 50 | +```bash |
| 51 | +# Ensure all platforms build successfully |
| 52 | +./gradlew build |
| 53 | + |
| 54 | +# Verify all fixes are working: |
| 55 | +# - Velocity: no event loop incompatibilities |
| 56 | +# - BungeeCord: no "channel not registered" errors |
| 57 | +# - Spigot/Paper: no IllegalAccessException on handshake |
| 58 | +``` |
| 59 | + |
| 60 | +### 2. Version Update |
| 61 | + |
| 62 | +Edit [build.gradle.kts](mdc:build.gradle.kts): |
| 63 | + |
| 64 | +```kotlin |
| 65 | +allprojects { |
| 66 | + group = "com.minekube.connect" |
| 67 | + version = "0.7.0" // Update this line |
| 68 | + // ... |
| 69 | +} |
| 70 | +``` |
| 71 | + |
| 72 | +### 3. Commit and Tag |
| 73 | + |
| 74 | +```bash |
| 75 | +git add build.gradle.kts |
| 76 | +git commit -m "Release version 0.7.0" |
| 77 | +git tag 0.7.0 |
| 78 | +``` |
| 79 | + |
| 80 | +### 4. Push Release |
| 81 | + |
| 82 | +```bash |
| 83 | +# Push branch first |
| 84 | +git push origin connect |
| 85 | + |
| 86 | +# Push tag to trigger release workflow |
| 87 | +git push origin 0.7.0 |
| 88 | +``` |
| 89 | + |
| 90 | +### 5. Monitor Release |
| 91 | + |
| 92 | +- Check GitHub Actions workflow completion |
| 93 | +- Verify 3 releases created: |
| 94 | + 1. Versioned release (`0.7.0`) |
| 95 | + 2. Latest release (`latest`) |
| 96 | + 3. Updated latest tag pointer |
| 97 | + |
| 98 | +## GitHub Actions Workflow |
| 99 | + |
| 100 | +The [release.yml](mdc:.github/workflows/release.yml) workflow: |
| 101 | + |
| 102 | +**Environment**: |
| 103 | + |
| 104 | +- Ubuntu latest |
| 105 | +- JDK 17 (Temurin distribution) |
| 106 | +- Gradle build action |
| 107 | + |
| 108 | +**Build Process**: |
| 109 | + |
| 110 | +1. Checkout code |
| 111 | +2. Setup Java and Gradle |
| 112 | +3. Run `./gradlew build` |
| 113 | +4. Copy JARs from `{platform}/build/libs/connect-{platform}.jar` |
| 114 | +5. Create releases with appropriate naming |
| 115 | + |
| 116 | +**Release Logic**: |
| 117 | + |
| 118 | +- **Tag push**: Creates versioned + latest releases |
| 119 | +- **Branch push**: Creates pre-release only |
| 120 | + |
| 121 | +## Version Numbering |
| 122 | + |
| 123 | +**Pattern**: `MAJOR.MINOR.PATCH` (semantic versioning) |
| 124 | + |
| 125 | +- **MAJOR**: Breaking changes to injection or API |
| 126 | +- **MINOR**: New platform support, significant features |
| 127 | +- **PATCH**: Bug fixes, compatibility updates |
| 128 | + |
| 129 | +**Recent versions**: 0.6.2 → 0.7.0 (next) |
| 130 | + |
| 131 | +## Release Verification |
| 132 | + |
| 133 | +After release, verify: |
| 134 | + |
| 135 | +1. **GitHub Releases**: All 3 releases created with correct JARs |
| 136 | +2. **JAR Integrity**: Download and verify JAR file sizes/contents |
| 137 | +3. **Platform Testing**: |
| 138 | + - Deploy to test servers |
| 139 | + - Verify injection works without errors |
| 140 | + - Test player connections through Connect network |
| 141 | + |
| 142 | +## Rollback Process |
| 143 | + |
| 144 | +If release has critical issues: |
| 145 | + |
| 146 | +```bash |
| 147 | +# Delete problematic tag |
| 148 | +git tag -d 0.7.0 |
| 149 | +git push origin :refs/tags/0.7.0 |
| 150 | + |
| 151 | +# Delete GitHub releases manually via web interface |
| 152 | +# Fix issues and re-release with patch version (0.7.1) |
| 153 | +``` |
| 154 | + |
| 155 | +## Pre-Release Testing |
| 156 | + |
| 157 | +For testing unreleased changes: |
| 158 | + |
| 159 | +1. Push to `connect` branch (without tag) |
| 160 | +2. Use JARs from `latest-prerelease` release |
| 161 | +3. Test on staging environments |
| 162 | +4. When stable, create official release tag |
| 163 | + |
| 164 | +## Common Release Issues |
| 165 | + |
| 166 | +- **Build failures**: Check Java/Gradle compatibility in workflow |
| 167 | +- **Missing JARs**: Verify shadow plugin configuration |
| 168 | +- **Wrong versions**: Ensure [build.gradle.kts](mdc:build.gradle.kts) version updated |
| 169 | +- **Tag conflicts**: Delete and recreate tags if needed |
| 170 | + |
| 171 | +## Release Notes Template |
| 172 | + |
| 173 | +```markdown |
| 174 | +## Connect Java 0.7.0 |
| 175 | + |
| 176 | +### Fixed |
| 177 | + |
| 178 | +- BungeeCord LocalServerChannel compatibility via IoHandler delegation |
| 179 | +- Spigot/Paper handshake packet creation for Java 21 + modern versions |
| 180 | +- Velocity event loop integration with LocalSession |
| 181 | + |
| 182 | +### Technical Changes |
| 183 | + |
| 184 | +- Updated Netty to 4.2.3.Final |
| 185 | +- Added LocalSession.setPlatformEventLoopGroup() hook |
| 186 | +- Implemented ConnectIoHandlerWrapper for BungeeCord |
| 187 | + |
| 188 | +### Platforms Supported |
| 189 | + |
| 190 | +- Velocity 3.x |
| 191 | +- BungeeCord/Waterfall |
| 192 | +- Spigot/Paper 1.19.4+ |
| 193 | +``` |
0 commit comments