Skip to content

Commit 34e913a

Browse files
authored
Add Buf publishing (#124)
**Before submitting your PR:** Please read through the contribution guide at https://github.com/bufbuild/connect-kotlin/blob/main/.github/CONTRIBUTING.md
1 parent c4e0302 commit 34e913a

File tree

3 files changed

+11
-10
lines changed

3 files changed

+11
-10
lines changed

.github/workflows/release.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ on:
44
push:
55
tags:
66
- "[0-9]+.[0-9]+.[0-9]+"
7-
workflow_dispatch:
7+
workflow_dispatch: {} # support manual runs
88

99
jobs:
1010
publish:
@@ -23,7 +23,7 @@ jobs:
2323
distribution: temurin
2424
java-version: 11
2525
check-latest: true
26-
- name: Build
26+
- name: Publish
2727
uses: gradle/gradle-build-action@v2
2828
with:
2929
arguments: |
@@ -34,9 +34,9 @@ jobs:
3434
-Dorg.gradle.internal.network.retry.max.attempts=1
3535
-Dorg.gradle.internal.publish.checksums.insecure=true
3636
env:
37-
OSSRH_USERNAME: ${{ secrets.OSSRH_USERNAME }}
38-
OSSRH_PASSWORD: ${{ secrets.OSSRH_PASSWORD }}
39-
PGP_KEY: ${{ secrets.PGP_KEY }}
40-
PGP_PASSWORD: ${{ secrets.PGP_PASSWORD }}
41-
GRADLE_PORTAL_PUBLISH_KEY: ${{ secrets.GRADLE_PORTAL_PUBLISH_KEY }}
42-
GRADLE_PORTAL_PUBLISH_SECRET: ${{ secrets.GRADLE_PORTAL_PUBLISH_SECRET }}
37+
OSSRH_USERNAME: ${{ secrets.SONATYPE_USER }}
38+
OSSRH_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
39+
PGP_KEY: ${{ secrets.GPG_KEY_ARMORED }}
40+
PGP_PASSWORD: ${{ secrets.GPG_PASSPHRASE }}
41+
GRADLE_PORTAL_PUBLISH_KEY: ${{ secrets.GRADLE_PUBLISH_KEY }}
42+
GRADLE_PORTAL_PUBLISH_SECRET: ${{ secrets.GRADLE_PUBLISH_SECRET }}

buildSrc/src/main/kotlin/ConfigurePublishing.kt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,8 @@ fun Project.configurePublishing() {
5656
configure<NexusPublishExtension> {
5757
repositories {
5858
sonatype {
59+
nexusUrl.set(uri("https://s01.oss.sonatype.org/service/local/"))
60+
snapshotRepositoryUrl.set(uri("https://s01.oss.sonatype.org/content/repositories/snapshots/"))
5961
username.set(Remote.username)
6062
password.set(Remote.password)
6163
}
@@ -72,7 +74,6 @@ fun Project.configurePublishing() {
7274

7375
configure<SigningExtension> {
7476
useInMemoryPgpKeys(Pgp.key, Pgp.password)
75-
7677
the<PublishingExtension>().publications.withType<MavenPublication> {
7778
standardPom()
7879
sign(this)

gradle/libs.versions.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# plugins
33
animalsniffer = "1.5.4"
44
kotlin = "1.6.20"
5-
pluginPublish = "1.0.0"
5+
pluginPublish = "1.1.0"
66
publishing = "0.22.0"
77
spotless = "6.11.0"
88

0 commit comments

Comments
 (0)