Skip to content

Commit b5b420b

Browse files
Updated publish.md with information about how to create and use a GPG key for publishing artifacts.
1 parent 274f5fc commit b5b420b

File tree

1 file changed

+32
-5
lines changed

1 file changed

+32
-5
lines changed

publish.md

+32-5
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,37 @@
11
# Dev setup
22

3-
In order to publish new version to Maven repository
4-
You need GPG key.
3+
## Create GPG key
4+
5+
Link: [GnuPG cheatsheet](https://devhints.io/gnupg)
6+
7+
In order to publish new version/release of Robocode to the Maven repository you need GPG key.
8+
9+
You can create it using this command:
10+
11+
```shell
12+
gpg --default-new-key-algo rsa4096 --gen-key
13+
```
14+
15+
You can export the public key to a file with this command:
16+
17+
```shell
18+
gpg --export --armor --output public-key.pub
19+
```
20+
21+
Next you need to upload your public key (is in the .pub file) to this server:
22+
http://keyserver.ubuntu.com:11371/
23+
24+
Next, you need to export the secret keys to a file that must be located in your home directory:
25+
26+
```shell
27+
gpg --keyring secring.gpg --export-secret-keys > [user-home-dir]/.gnupg/secring.gpg
28+
```
29+
30+
Where `[user-home-dir]` is the home directory for your user account.
31+
32+
You can list the secret keys with this command, to read out the last 8 digits of the secret GPG key:
533

634
```shell
7-
gpg --keyring secring.gpg --export-secret-keys > ~/.gnupg/secring.gpg
835
gpg -K
936
```
1037

@@ -18,7 +45,7 @@ ossrhUsername=<user-at-issues.sonatype.org>
1845
ossrhPassword=<password-at-issues.sonatype.org>
1946
```
2047

21-
# Just staging
48+
## Just staging
2249

2350
Make sure you are running on Java 8 before running the following commands.
2451

@@ -28,7 +55,7 @@ Make sure you are running on Java 8 before running the following commands.
2855

2956
When you log in, you should be able to see the binaries uploaded to [staging Repository].
3057

31-
# Release to public repos
58+
## Release to public repos
3259

3360
```shell
3461
./gradlew publishToSonatype closeAndReleaseSonatypeStagingRepository

0 commit comments

Comments
 (0)