Skip to content

Commit

Permalink
Update publishing instructions. (#120)
Browse files Browse the repository at this point in the history
  • Loading branch information
martinmr authored Oct 11, 2019
1 parent 04cb1aa commit 99d02ed
Showing 1 changed file with 10 additions and 11 deletions.
21 changes: 10 additions & 11 deletions PUBLISHING.md
Original file line number Diff line number Diff line change
@@ -1,19 +1,18 @@
## Publishing artefacts to Maven Central

Dgraph owns the `io.dgraph` namespace on Maven Central. See [JIRA ticket][jira] for details.
This document contains instructions to publish dgraph4j build artefacts to Maven central
This document contains instructions to publish dgraph4j build artefacts to Maven central.

[jira]: https://issues.sonatype.org/browse/OSSRH-35895

### Before Deploying

* Get access to credentials for `dgraph` JIRA account on Maven Central

* Generate GPG credentials. Make sure you set a passphrase.
- Note down the short version of the Key ID: `gpg --list-keys --keyid-format short`
- Generate a secret key ring file if not present: `gpg --export-secret-keys -o /path/to/.gnupg/secring.gpg`
- Publish the keys to the MIT server: `gpg --send-keys <key-id>` (Maven Central will check for keys here)

* Get access to credentials for `dgraph` JIRA account on Maven Central.
* Generate GPG credentials. Make sure you set a passphrase. You can use this
[guide](https://help.github.com/en/articles/generating-a-new-gpg-key).
* Note down the short version of the Key ID: `gpg --list-keys --keyid-format short`.
* Generate a secret key ring file if not present: `gpg --export-secret-keys -o /path/to/.gnupg/secring.gpg`.
* Publish the keys to the MIT server: `gpg --send-keys <key-id>` (Maven Central will check for keys here).
* Create `~/.gradle/gradle.properties` and populate it with all the credentials:
```
signing.keyId=<…keyId…>
Expand All @@ -25,11 +24,11 @@ ossrhPassword=<…password…>
```

### Deploying
* Build and test the code that needs to be published
* Build and test the code that needs to be published.
* Bump version by modifying the `version` variable in `build.gradle` file.
* Test the publish process locally by running `./gradlew publishMavenJavaPublicationToMavenLocal`
* Run `./gradlew publish`
* Release the deployment by following the steps on the page _Releasing the Deployment_ (link in references below)
* Run `./gradlew publish`.
* Release the deployment by following the steps on the page _Releasing the Deployment_ (link in references below).

### References
* [Publishing a project on Maven Central](https://medium.com/@nmauti/publishing-a-project-on-maven-central-8106393db2c3)
Expand Down

0 comments on commit 99d02ed

Please sign in to comment.