Skip to content

Commit 2932fc1

Browse files
committed
Fix workflows
1 parent 9957eff commit 2932fc1

File tree

3 files changed

+18
-16
lines changed

3 files changed

+18
-16
lines changed

.github/workflows/release.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,13 @@ jobs:
1212
steps:
1313
- uses: actions/checkout@v3
1414

15-
- name: 'Publish the artifacts for Android'
15+
- name: 'Publish Android libraries'
1616
env:
1717
ORG_GRADLE_PROJECT_SONATYPE_NEXUS_USERNAME: ${{ secrets.ORG_GRADLE_PROJECT_SONATYPE_NEXUS_USERNAME }}
1818
ORG_GRADLE_PROJECT_SONATYPE_NEXUS_PASSWORD: ${{ secrets.ORG_GRADLE_PROJECT_SONATYPE_NEXUS_PASSWORD }}
1919
ORG_GRADLE_PROJECT_signingKey: ${{ secrets.ORG_GRADLE_PROJECT_signingKey }}
2020
ORG_GRADLE_PROJECT_signingPassword: ${{ secrets.ORG_GRADLE_PROJECT_signingPassword }}
21-
run: ./gradlew publishReleasePublicationToMavenRepository --no-daemon
21+
run: ./gradlew publishAllPublicationsToMavenCentralRepository --no-daemon
2222

2323
env:
2424
GRADLE_OPTS: -Dorg.gradle.configureondemand=true -Dorg.gradle.parallel=false -Dkotlin.incremental=false -Dorg.gradle.jvmargs="-Xmx3g -XX:MaxPermSize=2048m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8"

gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
GROUP=com.petersamokhin.vksdk.android
2-
VERSION_NAME=0.0.3
2+
VERSION_NAME=0.0.3-SNAPSHOT
33

44
REPOSITORY_URL_MAVEN_STAGING_DEFAULT=https://oss.sonatype.org/service/local/staging/deploy/maven2/
55
REPOSITORY_URL_MAVEN_SNAPSHOT_DEFAULT=https://oss.sonatype.org/content/repositories/snapshots/

gradle/mavenpublish.gradle

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,6 @@
11
apply plugin: 'signing'
22

33
afterEvaluate {
4-
signing {
5-
required { !project.VERSION_NAME.endsWith('SNAPSHOT') }
6-
7-
def signingKey = project.signingKey
8-
def signingPassword = project.signingPassword
9-
useInMemoryPgpKeys(signingKey, signingPassword)
10-
11-
sign publishing.publications.release
12-
sign configurations.archives
13-
}
14-
154
publishing {
165
publications {
176
release(MavenPublication) {
@@ -52,8 +41,10 @@ afterEvaluate {
5241
}
5342
repositories {
5443
maven {
55-
def releasesRepoUrl = project.REPOSITORY_URL_MAVEN_STAGING_DEFAULT
56-
def snapshotsRepoUrl = project.REPOSITORY_URL_MAVEN_SNAPSHOT_DEFAULT
44+
name = 'mavenCentral'
45+
46+
def releasesRepoUrl = project.findProperty('REPOSITORY_URL_MAVEN_STAGING_DEFAULT')
47+
def snapshotsRepoUrl = project.findProperty('REPOSITORY_URL_MAVEN_SNAPSHOT_DEFAULT')
5748

5849
url = project.VERSION_NAME.endsWith('SNAPSHOT') ? snapshotsRepoUrl : releasesRepoUrl
5950

@@ -66,4 +57,15 @@ afterEvaluate {
6657
}
6758
}
6859
}
60+
61+
signing {
62+
required { !project.VERSION_NAME.endsWith('SNAPSHOT') }
63+
64+
def signingKey = project.findProperty('signingKey')
65+
def signingPassword = project.findProperty('signingPassword')
66+
useInMemoryPgpKeys(signingKey, signingPassword)
67+
68+
sign publishing.publications.release
69+
sign configurations.archives
70+
}
6971
}

0 commit comments

Comments
 (0)