-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Removed publishing as GitHub package
Signed-off-by: Juraci Paixão Kröhling <[email protected]>
- Loading branch information
1 parent
df5d9dc
commit 6a0e660
Showing
3 changed files
with
12 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,18 +7,16 @@ This project uses the regular Gradle mechanics to publish artifacts. The release | |
1. Tag the release: `git tag v0.1.1` | ||
1. Push the tag to the main repository: `git push [email protected]:opentracing-contrib/java-interceptors.git v0.1.1` | ||
|
||
Once this is done, GitHub will trigger a release, uploading it to Maven Central and GitHub Packages for this repository. | ||
Once this is done, GitHub will trigger a release, uploading it to Sonatype OSS Nexus instance (Maven Central). The automated release will not attempt to close nor release the staging repository created at Sonatype's OSS Nexus instance. Once a release is successful, make sure to close and release the staging repository. | ||
|
||
## Manual | ||
|
||
To do a manual release, you'll first need a few environment variables: | ||
|
||
* `GITHUB_ACTOR`, set to your GitHub username, required to publish as a GitHub package | ||
* `GITHUB_TOKEN` (with `write:packages` permission only), required to publish as a GitHub package | ||
* `ORG_GRADLE_PROJECT_sonatypeUsername`, required to publish to Maven Central | ||
* `ORG_GRADLE_PROJECT_sonatypePassword`, required to publish to Maven Central | ||
* `ORG_GRADLE_PROJECT_signingKey`, required to publish to Maven Central | ||
* `ORG_GRADLE_PROJECT_signingPassword`, required to publish to Maven Central | ||
* `ORG_GRADLE_PROJECT_sonatypeUsername` | ||
* `ORG_GRADLE_PROJECT_sonatypePassword` | ||
* `ORG_GRADLE_PROJECT_signingKey` | ||
* `ORG_GRADLE_PROJECT_signingPassword` | ||
|
||
The signing key can be set as follows. You'll need the key's password (passphrase). | ||
|
||
|
@@ -33,3 +31,8 @@ git checkout v0.1.1 | |
./gradlew publish | ||
``` | ||
|
||
Similar to the automated release, this will not close nor release the staging repository. You'll need to do it manually. | ||
|
||
## Sonatype OSS Nexus | ||
|
||
Publishing to Sonatype OSS Nexus via Gradle often fails, as Nexus will create a staging repository when the first file is uploaded. As this might take a while, Gradle might think it timed out and retry the request, triggering the creation of another staging repository. Once that happens, you'll end up with two repositories: one probably containing only one file, and another containing all files (including the one from the first repository). In that case, drop one of the repositories and re-run the `publish` Gradle command, just to be safe. This time, the existing repository should be used. For the automated release, it's safe to re-run the release workflow once only one of the staging repositories is available. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters