Skip to content

Commit 5aa2cb4

Browse files
Copilotfranz1981
andcommitted
Add comprehensive release documentation
Co-authored-by: franz1981 <[email protected]>
1 parent 4ff91a5 commit 5aa2cb4

File tree

2 files changed

+128
-33
lines changed

2 files changed

+128
-33
lines changed

README.md

Lines changed: 13 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -91,46 +91,26 @@ java -jar target/benchmarks.jar
9191

9292
## Release Process
9393

94-
This project uses [JReleaser](https://jreleaser.org/) to automate the release process.
94+
This project uses [JReleaser](https://jreleaser.org/) to automate the release process. See [RELEASE.md](RELEASE.md) for detailed instructions on setting up and triggering releases.
9595

96-
### Prerequisites for Release
96+
### Quick Start
9797

98-
1. Configure GitHub secrets in the repository:
99-
- `MAVEN_USERNAME`: Your Sonatype OSSRH username
100-
- `MAVEN_PASSWORD`: Your Sonatype OSSRH password
101-
- `GPG_PRIVATE_KEY`: Base64-encoded GPG private key (for signing artifacts)
102-
- `GPG_PASSPHRASE`: Passphrase for the GPG key
103-
- `GPG_PUBLIC_KEY`: Your GPG public key
98+
1. Configure GitHub secrets (see [RELEASE.md](RELEASE.md))
99+
2. Go to [Actions](../../actions) → Release workflow
100+
3. Click "Run workflow" and enter the release version
101+
4. The workflow will handle everything automatically
104102

105-
2. Ensure you have proper access rights to:
106-
- Push to the repository
107-
- Create releases in GitHub
108-
- Deploy to Maven Central via Sonatype OSSRH
103+
### What Gets Released
109104

110-
### Triggering a Release
105+
- **Maven Central**: Only `netty-virtualthread-core` artifact
106+
- **GitHub**: Full release with changelog
107+
- **Post-Release**: All modules automatically bumped to next SNAPSHOT version
111108

112-
Releases are triggered manually via GitHub Actions:
109+
For detailed prerequisites and troubleshooting, see [RELEASE.md](RELEASE.md).
113110

114-
1. Go to the [Actions tab](../../actions) in GitHub
115-
2. Select the "Release" workflow
116-
3. Click "Run workflow"
117-
4. Enter the desired release version (e.g., `1.0.0`)
118-
5. Click "Run workflow" to start the release process
111+
## License
119112

120-
### What Happens During Release
121-
122-
1. **Version Update**: Sets the project version to the release version
123-
2. **Build & Verify**: Compiles and verifies all modules
124-
3. **Sign Artifacts**: Signs JARs with GPG
125-
4. **Stage to Maven Central**: Only the `netty-virtualthread-core` artifact is deployed to Maven Central
126-
5. **Create GitHub Release**: Creates a GitHub release with changelog
127-
6. **Version Bump**: Automatically bumps all modules to the next SNAPSHOT version
128-
129-
### Release Configuration
130-
131-
- **Published Artifacts**: Only the core module (`netty-virtualthread-core`) is published to Maven Central
132-
- **Other Modules**: Benchmarks and examples are not published but their versions are bumped to SNAPSHOT
133-
- **License**: All source code is licensed under Apache License 2.0
113+
This project is licensed under the Apache License 2.0 - see the [LICENSE](LICENSE) file for details.
134114

135115
## References
136116
- Project Loom (OpenJDK): https://openjdk.org/projects/loom/

RELEASE.md

Lines changed: 115 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,115 @@
1+
# JReleaser Release Setup
2+
3+
This document describes how to configure and use the JReleaser automation for this project.
4+
5+
## Prerequisites
6+
7+
Before triggering a release, ensure you have configured the following GitHub secrets:
8+
9+
### Required Secrets
10+
11+
1. **MAVEN_USERNAME**: Your Sonatype OSSRH username
12+
- Get this from https://s01.oss.sonatype.org/
13+
14+
2. **MAVEN_PASSWORD**: Your Sonatype OSSRH password
15+
- This is your Sonatype OSSRH user token (preferred) or password
16+
17+
3. **GPG_PRIVATE_KEY**: Your GPG private key (base64 encoded)
18+
- Export your key: `gpg --export-secret-keys YOUR_KEY_ID | base64`
19+
- Or use: `gpg --export-secret-keys --armor YOUR_KEY_ID | base64`
20+
21+
4. **GPG_PASSPHRASE**: The passphrase for your GPG key
22+
- This is the password you use to unlock your GPG key
23+
24+
5. **GPG_PUBLIC_KEY**: Your GPG public key
25+
- Export: `gpg --export --armor YOUR_KEY_ID`
26+
27+
### Setting Up Secrets
28+
29+
1. Go to your repository on GitHub
30+
2. Navigate to Settings → Secrets and variables → Actions
31+
3. Click "New repository secret"
32+
4. Add each of the secrets listed above
33+
34+
## Generating GPG Keys (if you don't have one)
35+
36+
```bash
37+
# Generate a new GPG key
38+
gpg --full-generate-key
39+
40+
# List your keys to get the KEY_ID
41+
gpg --list-secret-keys --keyid-format=long
42+
43+
# Export the public key for upload to key servers
44+
gpg --keyserver keyserver.ubuntu.com --send-keys YOUR_KEY_ID
45+
46+
# Export for GitHub secret (base64 encoded)
47+
gpg --export-secret-keys --armor YOUR_KEY_ID | base64 -w 0
48+
```
49+
50+
## Triggering a Release
51+
52+
1. Go to the **Actions** tab in your GitHub repository
53+
2. Select the **Release** workflow from the left sidebar
54+
3. Click **Run workflow** (on the right side)
55+
4. Enter the release version (e.g., `1.0.0`, `1.1.0`, etc.)
56+
5. Click **Run workflow**
57+
58+
## What Happens During Release
59+
60+
The workflow will:
61+
62+
1. **Set Version**: Update all POM files to the release version
63+
2. **Build**: Compile and verify the project
64+
3. **Sign**: Sign all artifacts with GPG
65+
4. **Stage**: Deploy artifacts to the local staging directory
66+
5. **Release to Maven Central**: Deploy only the `netty-virtualthread-core` artifact to Maven Central
67+
6. **Create GitHub Release**: Create a GitHub release with changelog
68+
7. **Bump Version**: Automatically increment the version and add `-SNAPSHOT` suffix
69+
8. **Commit & Push**: Push the new SNAPSHOT version back to the master branch
70+
71+
## Release Artifacts
72+
73+
- **Published to Maven Central**: `netty-virtualthread-core` only
74+
- **Not Published**: `benchmarks`, `example-echo` (versions are still bumped to SNAPSHOT)
75+
76+
## Configuration Files
77+
78+
- `.github/workflows/release.yml`: GitHub Actions workflow
79+
- `.mvn/jreleaser.yml`: JReleaser configuration
80+
- `pom.xml`: Maven configuration with release profile
81+
82+
## Troubleshooting
83+
84+
### Release fails at Maven Central stage
85+
86+
- Check that MAVEN_USERNAME and MAVEN_PASSWORD are correct
87+
- Ensure you have proper permissions in Sonatype OSSRH
88+
- Check the staging repository at https://s01.oss.sonatype.org/
89+
90+
### Release fails at GPG signing
91+
92+
- Verify GPG_PRIVATE_KEY is properly base64 encoded
93+
- Check that GPG_PASSPHRASE is correct
94+
- Ensure the GPG key is not expired
95+
96+
### GitHub release creation fails
97+
98+
- The GITHUB_TOKEN is automatically provided by GitHub Actions
99+
- Check repository permissions in Settings → Actions → General
100+
101+
## Manual Cleanup
102+
103+
If a release fails partway through:
104+
105+
1. Delete the Git tag if created: `git push --delete origin TAG_NAME`
106+
2. Delete the GitHub release if created (in Releases section)
107+
3. Drop the staging repository in Sonatype if artifacts were staged
108+
4. Reset version in POM files: `mvn versions:set -DnewVersion=X.Y.Z-SNAPSHOT`
109+
110+
## Support
111+
112+
For issues with:
113+
- JReleaser: https://github.com/jreleaser/jreleaser/discussions
114+
- Maven Central: https://central.sonatype.org/support/
115+
- GPG: https://www.gnupg.org/documentation/

0 commit comments

Comments
 (0)