Skip to content

Commit dfaca6c

Browse files
committed
Add PUBLISHING.md
1 parent 381f193 commit dfaca6c

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed

PUBLISHING.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# Publishing
2+
3+
Keep Git tags with `vX.Y.Z-suffix` format. GitHub Actions job will only trigger on such tags and will remove `v` prefix.
4+
5+
See [`gradle-release.yml`](.github/workflows/gradle-release.yml) for whole publishing procedure.
6+
7+
Set the following environment variables in your CI/CD (GitHub Actions, etc.):
8+
9+
```txt
10+
# generated on Sonatype account
11+
PUBLISHING_USERNAME=<username>
12+
PUBLISHING_PASSWORD=<password>
13+
14+
# generated PGP key for signing artifacts
15+
SIGNING_KEY=<PGP key>
16+
SIGNING_PASSWORD=<PGP password>
17+
```
18+
19+
Artifacts are published to Maven Central via Sonatype, using following Gradle task.
20+
21+
```bash
22+
./gradlew -Pversion=<version> -Psign publishAggregationToCentralPortal
23+
```
24+
25+
This command uses `nmcp` Gradle plugin - [link](https://github.com/GradleUp/nmcp).
26+
27+
**Note** that this only uploads the artifacts to Sonatype repository. You need to manually log in to Sonatype to push
28+
the artifacts to Maven Central.

0 commit comments

Comments
 (0)