Skip to content

Commit

Permalink
prepare for 1.2.1 (#315)
Browse files Browse the repository at this point in the history
* prepare for 1.2.1

* only sign if there is a gpg key
  • Loading branch information
jamesward committed Jan 19, 2022
1 parent 0c75576 commit 5fb5eff
Show file tree
Hide file tree
Showing 5 changed files with 74 additions and 17 deletions.
28 changes: 28 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Release
on:
push:
tags:
- v**

jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1

- uses: actions/setup-java@v2
with:
distribution: 'adopt'
java-version: '8'
cache: 'gradle'

- name: release
env:
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }}
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
run: |
# todo: verify version is same as tag
./gradlew publishToSonatype closeAndReleaseSonatypeStagingRepository
7 changes: 7 additions & 0 deletions BUILDING.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,10 @@ $ ./gradlew publishToMavenLocal

Ensure that you configure your project build to use the local version of
gRPC-Kotlin.


## Releasing

1. [Generate a changelog](https://github.com/grpc/grpc-kotlin/releases/new) and prepend it to [CHANGELOG.md](CHANGELOG.md)
2. Create a Pull Request with updated versions in: [build.gradle.kts](build.gradle.kts) and [examples/build.gradle.kts](examples/build.gradle.kts)
3. Once merged, tag the release with `vX.Y.Z` and push the tag. This will kick off a GitHub Action that does the actual release.
20 changes: 20 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,25 @@
## Change Log

### 1.2.1

#### Changes
* ServerCalls: cancel only the request's Job by @goj in https://github.com/grpc/grpc-kotlin/pull/303
* Update README.md by @Tails128 in https://github.com/grpc/grpc-kotlin/pull/304
* Load rules_kotlin rules from jvm.bzl by @fmeum in https://github.com/grpc/grpc-kotlin/pull/300
* Depend on tools in the exec configuration by @fmeum in https://github.com/grpc/grpc-kotlin/pull/301
* Remove hardcoded references to @bazel by @aragos in https://github.com/grpc/grpc-kotlin/pull/305
* Compose UI by @jamesward in https://github.com/grpc/grpc-kotlin/pull/296
* add an integration test by @jamesward in https://github.com/grpc/grpc-kotlin/pull/310
* Add kotlinx-coroutines-core-jvm dependency by @bu3 in https://github.com/grpc/grpc-kotlin/pull/311

#### New Contributors
* @goj made their first contribution in https://github.com/grpc/grpc-kotlin/pull/303
* @Tails128 made their first contribution in https://github.com/grpc/grpc-kotlin/pull/304
* @fmeum made their first contribution in https://github.com/grpc/grpc-kotlin/pull/300
* @bu3 made their first contribution in https://github.com/grpc/grpc-kotlin/pull/311

**Full Changelog**: https://github.com/grpc/grpc-kotlin/compare/v1.2.0...v1.2.1

### 1.2.0

#### Changes
Expand Down
34 changes: 18 additions & 16 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,13 +1,17 @@
import org.gradle.api.tasks.testing.logging.TestExceptionFormat
import org.gradle.api.tasks.testing.logging.TestLogEvent
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
import org.jetbrains.kotlin.utils.addToStdlib.safeAs

plugins {
kotlin("jvm") version "1.3.72" apply false
id("com.google.protobuf") version "0.8.15" apply false

id("io.github.gradle-nexus.publish-plugin") version "1.1.0"
}

group = "io.grpc"
version = "1.2.1" // CURRENT_GRPC_KOTLIN_VERSION

ext["grpcVersion"] = "1.36.0" // CURRENT_GRPC_VERSION
ext["protobufVersion"] = "3.14.0"
ext["coroutinesVersion"] = "1.3.3"
Expand All @@ -22,8 +26,9 @@ subprojects {
plugin("signing")
}

group = "io.grpc"
version = "1.2.0" // CURRENT_GRPC_KOTLIN_VERSION
// gradle-nexus/publish-plugin needs these here too
group = rootProject.group
version = rootProject.version

repositories {
mavenCentral()
Expand Down Expand Up @@ -117,22 +122,19 @@ subprojects {
}
}

extensions.getByType<PublishingExtension>().repositories {
maven {
val snapshotUrl = uri("https://oss.sonatype.org/content/repositories/snapshots")
val releaseUrl = uri("https://oss.sonatype.org/service/local/staging/deploy/maven2")
url = if (version.safeAs<String>()?.endsWith("SNAPSHOT") == true) snapshotUrl else releaseUrl
credentials {
username = project.findProperty("sonatypeUsername")?.safeAs() ?: ""
password = project.findProperty("sonatypePassword")?.safeAs() ?: ""
}
}
}

extensions.getByType<SigningExtension>().sign(extensions.getByType<PublishingExtension>().publications.named("maven").get())
extensions.getByType<SigningExtension>().useInMemoryPgpKeys(System.getenv("GPG_PRIVATE_KEY"), System.getenv("GPG_PASSPHRASE"))

tasks.withType<Sign> {
onlyIf { project.hasProperty("signing.keyId") }
onlyIf { System.getenv("GPG_PRIVATE_KEY") != null }
}
}

nexusPublishing {
repositories {
sonatype {
username.set(System.getenv("SONATYPE_USERNAME"))
password.set(System.getenv("SONATYPE_PASSWORD"))
}
}
}
2 changes: 1 addition & 1 deletion examples/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ plugins {

// todo: move to subprojects, but how?
ext["grpcVersion"] = "1.39.0" // need to wait for grpc kotlin to move past this
ext["grpcKotlinVersion"] = "1.2.0" // CURRENT_GRPC_KOTLIN_VERSION
ext["grpcKotlinVersion"] = "1.2.1" // CURRENT_GRPC_KOTLIN_VERSION
ext["protobufVersion"] = "3.19.2"
ext["coroutinesVersion"] = "1.5.2"

Expand Down

0 comments on commit 5fb5eff

Please sign in to comment.