Skip to content

Commit 9ff428c

Browse files
committedJan 30, 2025
Update deployment workflow.
1 parent 614d49a commit 9ff428c

File tree

2 files changed

+43
-8
lines changed

2 files changed

+43
-8
lines changed
 

‎.github/workflows/deploy.yml

+3-8
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,6 @@ jobs:
1717
- name: Checkout Repository
1818
uses: actions/checkout@v4
1919

20-
- name: Install Ruby
21-
uses: ruby/setup-ruby@v1
22-
with:
23-
bundler-cache: true
24-
2520
- name: Install JDK
2621
uses: actions/setup-java@v4
2722
with:
@@ -33,10 +28,10 @@ jobs:
3328

3429
- name: Publish Package
3530
working-directory: ./MobileBuy
36-
run: ./gradlew buy3:uploadArchives
31+
run: ./gradlew publish
3732
env:
38-
OSSRH_USERNAME: ${{ secrets.OSSRH_USERNAME }}
39-
OSSRH_PASSWORD: ${{ secrets.OSSRH_PASSWORD }}
33+
ORG_GRADLE_PROJECT_ossrhUsername: ${{ secrets.OSSRH_USERNAME }}
34+
ORG_GRADLE_PROJECT_ossrhPassword: ${{ secrets.OSSRH_PASSWORD }}
4035
ORG_GRADLE_PROJECT_signingKeyId: ${{ secrets.OSSRH_GPG_SECRET_KEY_ID }}
4136
ORG_GRADLE_PROJECT_signingKey: ${{ secrets.OSSRH_GPG_SECRET_KEY }}
4237
ORG_GRADLE_PROJECT_signingPassword: ${{ secrets.OSSRH_GPG_SECRET_KEY_PASSWORD }}

‎MobileBuy/buy3/build.gradle.kts

+40
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
plugins {
22
alias(libs.plugins.android.library)
33
alias(libs.plugins.kotlin.android)
4+
signing
45
`maven-publish`
56
}
67

@@ -77,9 +78,48 @@ publishing {
7778
groupId = "com.shopify.mobilebuysdk"
7879
artifactId = "buy3"
7980

81+
pom {
82+
name = "Mobile Buy SDK"
83+
url = "https://github.com/Shopify/mobile-buy-sdk-android.git"
84+
developers {
85+
developer {
86+
name = "Shopify Inc."
87+
}
88+
}
89+
}
90+
8091
afterEvaluate {
8192
from(components["release"])
8293
}
8394
}
8495
}
96+
repositories {
97+
maven {
98+
name = "Staging"
99+
100+
url = uri("https://oss.sonatype.org/service/local/staging/deploy/maven2/")
101+
102+
val ossrhUsername: String? by project
103+
val ossrhPassword: String? by project
104+
105+
credentials {
106+
username = ossrhUsername
107+
password = ossrhPassword
108+
}
109+
}
110+
}
111+
}
112+
113+
signing {
114+
setRequired({
115+
gradle.taskGraph.hasTask("publish")
116+
})
117+
118+
val signingKeyId: String? by project
119+
val signingKey: String? by project
120+
val signingPassword: String? by project
121+
122+
useInMemoryPgpKeys(signingKeyId, signingKey, signingPassword)
123+
124+
sign(publishing.publications["release"])
85125
}

0 commit comments

Comments
 (0)
Failed to load comments.