Skip to content

Commit 77c048f

Browse files
authored
[build] configure gradle publish plugin (#690)
* [build] configure gradle publish plugin * add missing secrets to workflow
1 parent b57916a commit 77c048f

File tree

3 files changed

+14
-2
lines changed

3 files changed

+14
-2
lines changed

.github/workflows/release.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,3 +31,5 @@ jobs:
3131
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
3232
GPG_SECRET: ${{ secrets.GPG_SECRET }}
3333
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
34+
PLUGIN_PORTAL_KEY: ${{ secrets.PLUGIN_PORTAL_KEY }}
35+
PLUGIN_PORTAL_SECRET: ${{ secrets.PLUGIN_PORTAL_SECRET }}

build.gradle.kts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -208,6 +208,7 @@ tasks {
208208
delayBetweenRetriesInMillis = 5000
209209
}
210210

211-
val publish by getting
212-
publish.dependsOn(":initializeSonatypeStagingRepository")
211+
publish {
212+
dependsOn(":initializeSonatypeStagingRepository")
213+
}
213214
}

plugins/graphql-kotlin-gradle-plugin/build.gradle.kts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,15 @@ pluginBundle {
3939
}
4040

4141
tasks {
42+
publishPlugins {
43+
doFirst {
44+
System.setProperty("gradle.publish.key", System.getenv("PLUGIN_PORTAL_KEY"))
45+
System.setProperty("gradle.publish.secret", System.getenv("PLUGIN_PORTAL_SECRET"))
46+
}
47+
}
48+
publish {
49+
dependsOn(":plugins:graphql-kotlin-gradle-plugin:publishPlugins")
50+
}
4251
test {
4352
systemProperty("graphQLKotlinVersion", project.version)
4453
systemProperty("kotlinVersion", kotlinVersion)

0 commit comments

Comments
 (0)