Skip to content

Commit

Permalink
Publish muzze plugins to Gradle Plugin Portal
Browse files Browse the repository at this point in the history
  • Loading branch information
iNikem committed Aug 3, 2021
1 parent 4b47bc5 commit fa5c320
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 22 deletions.
12 changes: 5 additions & 7 deletions .github/workflows/gradle-plugins.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ on:
workflow_dispatch:

jobs:
snapshot:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected]
Expand All @@ -29,11 +29,9 @@ jobs:
path: ~/.gradle/wrapper
key: ${{ runner.os }}-gradle-wrapper-cache-${{ hashFiles('gradle/wrapper/gradle-wrapper.properties') }}

- name: Publish snapshot
- name: Publish plugins
env:
SONATYPE_USER: ${{ secrets.SONATYPE_USER }}
SONATYPE_KEY: ${{ secrets.SONATYPE_KEY }}
GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }}
GPG_PASSWORD: ${{ secrets.GPG_PASSWORD }}
run: ../gradlew build publishToSonatype
GRADLE_PUBLISH_KEY: ${{ secrets.GRADLE_PUBLISH_KEY }}
GRADLE_PUBLISH_SECRET: ${{ secrets.GRADLE_PUBLISH_SECRET }}
run: ../gradlew build publishPlugins
working-directory: gradle-plugins
24 changes: 10 additions & 14 deletions gradle-plugins/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,10 @@ plugins {
`maven-publish`

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

group = "io.opentelemetry.instrumentation"
version = "0.2.0-SNAPSHOT"
version = "0.3.0"

repositories {
mavenCentral()
Expand Down Expand Up @@ -47,19 +46,16 @@ tasks.withType<Test>().configureEach {
pluginBundle {
website = "https://opentelemetry.io"
vcsUrl = "https:/open-telemetry/opentelemetry-java-instrumentation"
tags = listOf("opentelemetry", "instrumentation")
tags = listOf("opentelemetry", "instrumentation", "java")
}

nexusPublishing {
packageGroup.set("io.opentelemetry")

repositories {
sonatype {
username.set(System.getenv("SONATYPE_USER"))
password.set(System.getenv("SONATYPE_KEY"))
gradlePlugin {
plugins {
get("io.opentelemetry.instrumentation.muzzle-generation").apply {
displayName = "Muzzle safety net generation"
}
get("io.opentelemetry.instrumentation.muzzle-check").apply {
displayName = "Checks instrumented libraries against muzzle safety net"
}
}

connectTimeout.set(Duration.ofMinutes(5))
clientTimeout.set(Duration.ofMinutes(5))
}
}
1 change: 0 additions & 1 deletion gradle-plugins/settings.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,5 @@ pluginManagement {
plugins {
id("com.gradle.plugin-publish") version "0.15.0"
id("org.jetbrains.kotlin.jvm") version "1.5.10"
id("io.github.gradle-nexus.publish-plugin") version "1.1.0"
}
}

0 comments on commit fa5c320

Please sign in to comment.