Skip to content

Commit 1eadac5

Browse files
committed
Publish to maven central 4
1 parent 3298831 commit 1eadac5

File tree

2 files changed

+10
-21
lines changed

2 files changed

+10
-21
lines changed

.github/workflows/publish-maven.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,10 @@ jobs:
1616
run: chmod +x ./gradlew
1717
- name: Validate Gradle wrapper
1818
uses: gradle/wrapper-validation-action@e6e38bacfdf1a337459f332974bb2327a31aaf4b
19-
- name: Publish package
19+
- name: Publish & Release to Central
2020
uses: gradle/gradle-build-action@67421db6bd0bf253fb4bd25b31ebb98943c375e1
2121
with:
22-
arguments: publish closeAndReleaseRepository
22+
arguments: publishToSonatype closeAndReleaseSonatypeStagingRepository
2323
env:
2424
MAVEN_CENTRAL_USERNAME: ${{ secrets.MAVEN_CENTRAL_USERNAME }}
2525
MAVEN_CENTRAL_PASSWORD: ${{ secrets.MAVEN_CENTRAL_PASSWORD }}

build.gradle

Lines changed: 8 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,3 @@
1-
apply plugin: 'idea'
2-
apply plugin: 'eclipse'
3-
apply plugin: 'java'
4-
apply plugin: 'com.diffplug.spotless'
5-
6-
group = 'co.unit'
7-
version = '0.2.3'
8-
91
buildscript {
102
repositories {
113
mavenCentral()
@@ -21,6 +13,14 @@ plugins {
2113
id 'io.github.gradle-nexus.publish-plugin' version '1.3.0'
2214
}
2315

16+
apply plugin: 'idea'
17+
apply plugin: 'eclipse'
18+
apply plugin: 'java'
19+
apply plugin: 'com.diffplug.spotless'
20+
21+
group = 'co.unit'
22+
version = '0.2.3'
23+
2424
repositories {
2525
mavenCentral()
2626
}
@@ -107,17 +107,6 @@ if(hasProperty('target') && target == 'android') {
107107
}
108108
}
109109
}
110-
111-
repositories {
112-
maven {
113-
name = "MavenCentral"
114-
url = uri("https://ossrh-staging-api.central.sonatype.com/service/local/staging/deploy/maven2/")
115-
credentials {
116-
username = System.getenv("MAVEN_CENTRAL_USERNAME")
117-
password = System.getenv("MAVEN_CENTRAL_PASSWORD")
118-
}
119-
}
120-
}
121110
}
122111

123112
nexusPublishing {

0 commit comments

Comments
 (0)