Skip to content

Commit abe34e5

Browse files
committed
Update release workflow and Gradle configuration for Maven Central publishing
1 parent 31fc029 commit abe34e5

File tree

2 files changed

+11
-5
lines changed

2 files changed

+11
-5
lines changed

.github/workflows/publish-release.yml

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
name: Publish - Release
22

33
on:
4+
push:
5+
branches:
6+
- fix/release-workflow
47
release:
58
types: [released]
69

@@ -12,6 +15,7 @@ jobs:
1215
uses: actions/checkout@v3
1316
- name: Setup Gradle
1417
uses: gradle/gradle-build-action@v2
18+
1519
- name: Setup local.properties
1620
run: |
1721
cat << EOF >> local.properties
@@ -23,15 +27,17 @@ jobs:
2327
contentType="${{ secrets.CONTENT_TYPE }}"
2428
assetUid="${{ secrets.ASSET_UID }}"
2529
EOF
30+
2631
- name: Gradle build and clean
2732
run: |
2833
./gradlew clean build
29-
- name: Publish the SDK
34+
35+
- name: Publish to Maven Central
3036
run: |
3137
./gradlew publishAndReleaseToMavenCentral --no-configuration-cache
3238
env:
33-
ORG_GRADLE_PROJECT_mavenCentralUsername: ${{ secrets.mavenCentralUsername }}
34-
ORG_GRADLE_PROJECT_mavenCentralPassword: ${{ secrets.mavenCentralPassword }}
39+
ORG_GRADLE_PROJECT_mavenCentralUsername: ${{ secrets.MAVEN_USERNAME }}
40+
ORG_GRADLE_PROJECT_mavenCentralPassword: ${{ secrets.MAVEN_PASSWORD }}
3541
ORG_GRADLE_PROJECT_signingInMemoryKey: ${{ secrets.signingInMemoryKey }}
3642
ORG_GRADLE_PROJECT_signingInMemoryKeyId: ${{ secrets.signingInMemoryKeyId }}
3743
ORG_GRADLE_PROJECT_signingInMemoryKeyPassword: ${{ secrets.signingInMemoryKeyPassword }}

contentstack/build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ import com.vanniktech.maven.publish.SonatypeHost
88
android.buildFeatures.buildConfig true
99

1010
mavenPublishing {
11-
publishToMavenCentral(SonatypeHost.DEFAULT)
11+
publishToMavenCentral("OSSRH") // Use OSSRH for Sonatype OSSRH (Maven Central)
1212
signAllPublications()
13-
coordinates("com.contentstack.sdk", "android", "4.1.0")
13+
coordinates("com.contentstack.sdk", "android", "4.1.0-beta")
1414

1515
pom {
1616
name = "contentstack-android"

0 commit comments

Comments
 (0)