diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 00000000..b9e3338d --- /dev/null +++ b/.github/workflows/release.yml @@ -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 diff --git a/BUILDING.md b/BUILDING.md index 3a92955d..5eabd4c2 100644 --- a/BUILDING.md +++ b/BUILDING.md @@ -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. \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index eb4d96ac..41e13cd9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 diff --git a/build.gradle.kts b/build.gradle.kts index 909ae3b7..e3cd6d40 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -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" @@ -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() @@ -117,22 +122,19 @@ subprojects { } } - extensions.getByType().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()?.endsWith("SNAPSHOT") == true) snapshotUrl else releaseUrl - credentials { - username = project.findProperty("sonatypeUsername")?.safeAs() ?: "" - password = project.findProperty("sonatypePassword")?.safeAs() ?: "" - } - } - } - extensions.getByType().sign(extensions.getByType().publications.named("maven").get()) + extensions.getByType().useInMemoryPgpKeys(System.getenv("GPG_PRIVATE_KEY"), System.getenv("GPG_PASSPHRASE")) tasks.withType { - 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")) + } + } } diff --git a/examples/build.gradle.kts b/examples/build.gradle.kts index 83a4f0e9..152d93ac 100644 --- a/examples/build.gradle.kts +++ b/examples/build.gradle.kts @@ -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"