Skip to content

Commit

Permalink
Add Buf publishing (#124)
Browse files Browse the repository at this point in the history
**Before submitting your PR:** Please read through the contribution
guide at
https://github.com/bufbuild/connect-kotlin/blob/main/.github/CONTRIBUTING.md
  • Loading branch information
buildbreaker authored Apr 24, 2023
1 parent c4e0302 commit 34e913a
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 10 deletions.
16 changes: 8 additions & 8 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
push:
tags:
- "[0-9]+.[0-9]+.[0-9]+"
workflow_dispatch:
workflow_dispatch: {} # support manual runs

jobs:
publish:
Expand All @@ -23,7 +23,7 @@ jobs:
distribution: temurin
java-version: 11
check-latest: true
- name: Build
- name: Publish
uses: gradle/gradle-build-action@v2
with:
arguments: |
Expand All @@ -34,9 +34,9 @@ jobs:
-Dorg.gradle.internal.network.retry.max.attempts=1
-Dorg.gradle.internal.publish.checksums.insecure=true
env:
OSSRH_USERNAME: ${{ secrets.OSSRH_USERNAME }}
OSSRH_PASSWORD: ${{ secrets.OSSRH_PASSWORD }}
PGP_KEY: ${{ secrets.PGP_KEY }}
PGP_PASSWORD: ${{ secrets.PGP_PASSWORD }}
GRADLE_PORTAL_PUBLISH_KEY: ${{ secrets.GRADLE_PORTAL_PUBLISH_KEY }}
GRADLE_PORTAL_PUBLISH_SECRET: ${{ secrets.GRADLE_PORTAL_PUBLISH_SECRET }}
OSSRH_USERNAME: ${{ secrets.SONATYPE_USER }}
OSSRH_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
PGP_KEY: ${{ secrets.GPG_KEY_ARMORED }}
PGP_PASSWORD: ${{ secrets.GPG_PASSPHRASE }}
GRADLE_PORTAL_PUBLISH_KEY: ${{ secrets.GRADLE_PUBLISH_KEY }}
GRADLE_PORTAL_PUBLISH_SECRET: ${{ secrets.GRADLE_PUBLISH_SECRET }}
3 changes: 2 additions & 1 deletion buildSrc/src/main/kotlin/ConfigurePublishing.kt
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,8 @@ fun Project.configurePublishing() {
configure<NexusPublishExtension> {
repositories {
sonatype {
nexusUrl.set(uri("https://s01.oss.sonatype.org/service/local/"))
snapshotRepositoryUrl.set(uri("https://s01.oss.sonatype.org/content/repositories/snapshots/"))
username.set(Remote.username)
password.set(Remote.password)
}
Expand All @@ -72,7 +74,6 @@ fun Project.configurePublishing() {

configure<SigningExtension> {
useInMemoryPgpKeys(Pgp.key, Pgp.password)

the<PublishingExtension>().publications.withType<MavenPublication> {
standardPom()
sign(this)
Expand Down
2 changes: 1 addition & 1 deletion gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# plugins
animalsniffer = "1.5.4"
kotlin = "1.6.20"
pluginPublish = "1.0.0"
pluginPublish = "1.1.0"
publishing = "0.22.0"
spotless = "6.11.0"

Expand Down

0 comments on commit 34e913a

Please sign in to comment.