11# Releasing
22
3- ## Sonatype Snapshots
4-
5- See [ ` gradle-publish-snapshot.yml ` ] ( .github/workflows/gradle-publish-snapshot.yml ) for publishing snapshot version
6- instructions. Workflow requires manual trigger for snapshot build so it's not published regularly.
7-
8- Artifacts are published to Snapshot Repository, using following Gradle task.
9-
10- ``` bash
11- ./gradlew -Pversion=< version> publishAllPublicationsToCentralPortalSnapshots
12- ```
13-
14- ### Accessing packages from Sonatype Snapshots
15-
16- 1 . Maven:
17- ``` xml
18- <repositories >
19- <repository >
20- <id >sonatype-snapshots</id >
21- <url >https://central.sonatype.com/repository/maven-snapshots/</url >
22- <releases >
23- <enabled >false</enabled >
24- </releases >
25- <snapshots >
26- <enabled >true</enabled >
27- <updatePolicy >always</updatePolicy >
28- </snapshots >
29- </repository >
30- </repositories >
31- <dependencies >
32- <dependency >
33- <groupId >io.github.malczuuu.problem4j</groupId >
34- <artifactId >problem4j-core</artifactId >
35- <version >1.3.0-SNAPSHOT</version >
36- </dependency >
37- </dependencies >
38- ```
39- 2 . Gradle (Kotlin DSL):
40- ``` kotlin
41- repositories {
42- mavenCentral()
43- maven {
44- url = uri(" https://central.sonatype.com/repository/maven-snapshots/" )
45- content {
46- includeGroup(" io.github.malczuuu.problem4j" )
47- }
48- mavenContent {
49- snapshotsOnly()
50- }
51- }
52- }
53- dependencies {
54- implementation(" io.github.malczuuu.problem4j:problem4j-core:1.3.0-SNAPSHOT" )
55- }
56- ```
57-
583## Maven Central
594
5+ [ ![ Publish Release Status] ( https://github.com/malczuuu/problem4j-core/actions/workflows/gradle-publish-release.yml/badge.svg )] [ gradle-publish-release ]
6+ [ ![ Sonatype] ( https://img.shields.io/maven-central/v/io.github.malczuuu.problem4j/problem4j-core )] [ maven-central ]
7+
6081 . Keep Git tags with ` vX.Y.Z-suffix ` format. GitHub Actions job will only trigger on such tags and will remove ` v `
619 prefix.
62- 2 . After publishing a release, update [ ` next_version.txt ` ] ( .github/utils/next_version.txt ) for snapshot builds
63- automation.
64- 3 . The releasing procedure only uploads the artifacts to Sonatype repository. You need to manually log in to Sonatype to
10+ 2 . The releasing procedure only uploads the artifacts to Sonatype repository. You need to manually log in to Sonatype to
6511 push the artifacts to Maven Central.
6612
67- See [ ` gradle-publish-release.yml ` ] ( .github/workflows/gradle-publish-release.yml ) for publishing release versions
68- instructions.
13+ See [ ` gradle-publish-release.yml ` ] [ gradle-publish-release.yml ] for publishing release versions instructions.
6914
7015Set the following environment variables in your CI/CD (GitHub Actions, etc.):
7116
@@ -86,3 +31,9 @@ Artifacts are published to Maven Central via Sonatype, using following Gradle ta
8631```
8732
8833This command uses ` nmcp ` Gradle plugin - [ link] ( https://github.com/GradleUp/nmcp ) .
34+
35+ [ gradle-publish-release ] : https://github.com/malczuuu/problem4j-core/actions/workflows/gradle-publish-release.yml
36+
37+ [ gradle-publish-release.yml ] : .github/workflows/gradle-publish-release.yml
38+
39+ [ maven-central ] : https://central.sonatype.com/artifact/io.github.malczuuu.problem4j/problem4j-core
0 commit comments