From 89b1983e74911108ee2e979772b1092cd5cd071b Mon Sep 17 00:00:00 2001 From: Artem Eroshenko Date: Sun, 28 Mar 2021 22:32:51 +0300 Subject: [PATCH 01/23] release to maven central --- build.gradle.kts | 1 - gradle/bintray.gradle | 31 ------------------------------- gradle/maven-publish.gradle | 13 +++++++++++++ 3 files changed, 13 insertions(+), 32 deletions(-) delete mode 100644 gradle/bintray.gradle diff --git a/build.gradle.kts b/build.gradle.kts index ed03769e5..1abe72fd1 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -73,7 +73,6 @@ configure(subprojects) { apply(plugin = "ru.vyarus.quality") apply(plugin = "com.diffplug.spotless") apply(plugin = "io.qameta.allure") - apply(from = "$gradleScriptDir/bintray.gradle") apply(from = "$gradleScriptDir/maven-publish.gradle") configure { diff --git a/gradle/bintray.gradle b/gradle/bintray.gradle deleted file mode 100644 index 60e005f04..000000000 --- a/gradle/bintray.gradle +++ /dev/null @@ -1,31 +0,0 @@ -apply plugin: 'com.jfrog.bintray' - -bintray { - user = project.hasProperty('bintrayUser') ? project.property('bintrayUser') : System.getenv('BINTRAY_USER') - key = project.hasProperty('bintrayApiKey') ? project.property('bintrayApiKey') : System.getenv('BINTRAY_API_KEY') - - configurations = ['archives'] - - publish = true - pkg { - userOrg = 'qameta' - repo = 'maven' - name = 'allure-java' - desc = 'Allure Java integrations' - websiteUrl = 'https://github.com/allure-framework/allure-java' - issueTrackerUrl = 'https://github.com/allure-framework/allure-java' - vcsUrl = 'https://github.com/allure-framework/allure-java.git' - licenses = ['Apache-2.0'] - - githubRepo = 'allure-framework/allure-java' - githubReleaseNotesFile = 'README.md' - - version { - name = project.version - released = new Date() - gpg { - sign = true - } - } - } -} diff --git a/gradle/maven-publish.gradle b/gradle/maven-publish.gradle index 7543a22be..8debb0184 100644 --- a/gradle/maven-publish.gradle +++ b/gradle/maven-publish.gradle @@ -6,6 +6,19 @@ install { } } +publishing { + repositories { + maven { + name = "OSSRH" + url = "https://oss.sonatype.org/service/local/staging/deploy/maven2/" + credentials { + username = System.getenv("MAVEN_USERNAME") + password = System.getenv("MAVEN_PASSWORD") + } + } + } +} + def customizePom(pom, gradleProject) { pom.whenConfigured { generatedPom -> // eliminate testng-scoped dependencies (no need in maven central poms) From c129f68070f515d77d38a6fa85efe70b72a28b7a Mon Sep 17 00:00:00 2001 From: Artem Eroshenko Date: Sun, 28 Mar 2021 22:33:19 +0300 Subject: [PATCH 02/23] test release --- .github/workflows/release.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 0a72b1b46..efe3e1716 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -1,6 +1,9 @@ name: Release on: + pull_request: + branches: + - '*' release: types: [published] From 67557f155906fab75b9155d21d2a353cad71ddf4 Mon Sep 17 00:00:00 2001 From: Artem Eroshenko Date: Sun, 28 Mar 2021 22:39:35 +0300 Subject: [PATCH 03/23] add publish plugin --- gradle/maven-publish.gradle | 1 + 1 file changed, 1 insertion(+) diff --git a/gradle/maven-publish.gradle b/gradle/maven-publish.gradle index 8debb0184..c9f4dadca 100644 --- a/gradle/maven-publish.gradle +++ b/gradle/maven-publish.gradle @@ -1,4 +1,5 @@ apply plugin: 'maven' +apply plugin: 'maven-publish' install { repositories.mavenInstaller { From 1cb1ee8a2d3c2af806b14f3e6e5422326a6cc30d Mon Sep 17 00:00:00 2001 From: Artem Eroshenko Date: Sun, 28 Mar 2021 22:41:59 +0300 Subject: [PATCH 04/23] get rid of bintrayUpload --- build.gradle.kts | 5 ----- 1 file changed, 5 deletions(-) diff --git a/build.gradle.kts b/build.gradle.kts index 1abe72fd1..92350387d 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -227,11 +227,6 @@ configure(subprojects) { artifacts.add("archives", sourceJar) artifacts.add("archives", javadocJar) - val bintrayUpload by tasks.existing - afterReleaseBuild { - dependsOn(bintrayUpload) - } - repositories { mavenLocal() mavenCentral() From 3bac9b2e5628179cfb661c9b653f5b862a64f9a0 Mon Sep 17 00:00:00 2001 From: Artem Eroshenko Date: Mon, 29 Mar 2021 13:39:54 +0300 Subject: [PATCH 05/23] add maven publish plugin --- build.gradle.kts | 61 +++++++++++++++++++++++++++----- gradle/maven-publish.gradle | 69 ------------------------------------- 2 files changed, 52 insertions(+), 78 deletions(-) delete mode 100644 gradle/maven-publish.gradle diff --git a/build.gradle.kts b/build.gradle.kts index 92350387d..6d8b5f411 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -37,7 +37,7 @@ tasks.withType(Wrapper::class) { plugins { java `java-library` - id("net.researchgate.release") version "2.8.1" + `maven-publish` id("io.qameta.allure") version "2.8.1" } @@ -50,12 +50,6 @@ tasks.withType(JavaCompile::class) { options.encoding = "UTF-8" } -release { - tagTemplate = "\${version}" -} - -val afterReleaseBuild by tasks.existing - configure(listOf(rootProject)) { description = "Allure Java" group = "io.qameta.allure" @@ -68,12 +62,11 @@ configure(subprojects) { apply(plugin = "java") apply(plugin = "java-library") - apply(plugin = "maven") + apply(plugin = "maven-publish") apply(plugin = "io.spring.dependency-management") apply(plugin = "ru.vyarus.quality") apply(plugin = "com.diffplug.spotless") apply(plugin = "io.qameta.allure") - apply(from = "$gradleScriptDir/maven-publish.gradle") configure { imports { @@ -227,6 +220,56 @@ configure(subprojects) { artifacts.add("archives", sourceJar) artifacts.add("archives", javadocJar) + publishing { + publications { + create("maven") { + pom { + name.set(project.description) + description.set(project.description) + url.set("https://github.com/allure-framework/allure-java") + licenses { + license { + name.set("The Apache License, Version 2.0") + url.set("http://www.apache.org/licenses/LICENSE-2.0.txt") + } + } + developers { + developer { + id.set("baev") + name.set("Dmitry Baev") + email.set("baev@qameta.io") + } + developer { + id.set("eroshenkoam") + name.set("Artem Eroshenko") + email.set("artem@qameta.io") + } + } + scm { + developerConnection.set("scm:git:git://github.com/allure-framework/allure-java") + connection.set("scm:git:git://github.com/allure-framework/allure-java") + url.set("https://github.com/allure-framework/allure-java") + } + issueManagement { + system.set("GitHub Issues") + url.set("https://github.com/allure-framework/allure-java/issues") + } + } + } + } + repositories { + maven { + name = "OSSRH" + url = uri("https://oss.sonatype.org/service/local/staging/deploy/maven2/") + credentials { + username = System.getenv("MAVEN_USERNAME") + password = System.getenv("MAVEN_PASSWORD") + } + } + } + + } + repositories { mavenLocal() mavenCentral() diff --git a/gradle/maven-publish.gradle b/gradle/maven-publish.gradle deleted file mode 100644 index c9f4dadca..000000000 --- a/gradle/maven-publish.gradle +++ /dev/null @@ -1,69 +0,0 @@ -apply plugin: 'maven' -apply plugin: 'maven-publish' - -install { - repositories.mavenInstaller { - customizePom(pom, project) - } -} - -publishing { - repositories { - maven { - name = "OSSRH" - url = "https://oss.sonatype.org/service/local/staging/deploy/maven2/" - credentials { - username = System.getenv("MAVEN_USERNAME") - password = System.getenv("MAVEN_PASSWORD") - } - } - } -} - -def customizePom(pom, gradleProject) { - pom.whenConfigured { generatedPom -> - // eliminate testng-scoped dependencies (no need in maven central poms) - generatedPom.dependencies.removeAll { dep -> - dep.scope == "test" - } - - // sort to make pom dependencies order consistent to ease comparison of older poms - generatedPom.dependencies = generatedPom.dependencies.sort { dep -> - "$dep.scope:$dep.groupId:$dep.artifactId" - } - - // add all items necessary for maven central publication - generatedPom.project { - name = gradleProject.description - description = gradleProject.description - url = "https://github.com/allure-framework/allure-java" - organization { - name = "Qameta IO" - url = "https://qameta.io" - } - licenses { - license { - name = 'The Apache Software License, Version 2.0' - url = 'http://www.apache.org/licenses/LICENSE-2.0.txt' - distribution = 'repo' - } - } - scm { - url = 'https://github.com/allure-framework/allure-java' - connection = 'scm:git:git://github.com/allure-framework/allure-java' - developerConnection = 'scm:git:git://github.com/allure-framework/allure-java' - } - developers { - developer { - id = 'baev' - name = 'Dmitry Baev' - email = 'baev@qameta.io' - } - } - issueManagement { - system = 'Github Issues' - url = 'https://github.com/allure-framework/allure-java/issues' - } - } - } -} From 5aa5de05428ca065e89cb769df2cd72a9be463c2 Mon Sep 17 00:00:00 2001 From: Artem Eroshenko Date: Mon, 29 Mar 2021 13:54:07 +0300 Subject: [PATCH 06/23] add artifacts --- build.gradle.kts | 24 ++++++------------------ 1 file changed, 6 insertions(+), 18 deletions(-) diff --git a/build.gradle.kts b/build.gradle.kts index 6d8b5f411..c9749261d 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -1,8 +1,6 @@ import com.diffplug.gradle.spotless.SpotlessExtension -import io.qameta.allure.gradle.AllureExtension import io.qameta.allure.gradle.task.AllureReport import io.spring.gradle.dependencymanagement.dsl.DependencyManagementExtension -import org.gradle.jvm.tasks.Jar import ru.vyarus.gradle.plugin.quality.QualityExtension buildscript { @@ -198,31 +196,21 @@ configure(subprojects) { encoding("UTF-8") } - configure { + allure { autoconfigure = false aspectjweaver = false } - val sourceJar by tasks.creating(Jar::class) { - from(sourceSets.getByName("main").allSource) - archiveClassifier.set("sources") + java { + withJavadocJar() + withSourcesJar() } - val javadocJar by tasks.creating(Jar::class) { - from(tasks.getByName("javadoc")) - archiveClassifier.set("javadoc") - } - - tasks.withType(Javadoc::class) { - (options as StandardJavadocDocletOptions).addStringOption("Xdoclint:none", "-quiet") - } - - artifacts.add("archives", sourceJar) - artifacts.add("archives", javadocJar) - publishing { publications { create("maven") { + from(components["java"]) + pom { name.set(project.description) description.set(project.description) From ab49867b76c223477c035f0005e8bc56a6658712 Mon Sep 17 00:00:00 2001 From: Artem Eroshenko Date: Mon, 29 Mar 2021 14:00:02 +0300 Subject: [PATCH 07/23] fix javadoc --- build.gradle.kts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/build.gradle.kts b/build.gradle.kts index c9749261d..9eb2c9c33 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -206,6 +206,10 @@ configure(subprojects) { withSourcesJar() } + tasks.withType(Javadoc::class) { + (options as StandardJavadocDocletOptions).addStringOption("Xdoclint:none", "-quiet") + } + publishing { publications { create("maven") { From aee262c81bcfce399f127610a51b3e559f56a951 Mon Sep 17 00:00:00 2001 From: Dmitry Baev Date: Mon, 29 Mar 2021 18:43:26 +0300 Subject: [PATCH 08/23] fix build --- allure-junit-platform/build.gradle.kts | 15 ++++++++------- allure-junit5/build.gradle.kts | 13 +++++++------ allure-model/build.gradle.kts | 2 +- allure-testng/build.gradle.kts | 15 ++++++++------- build.gradle.kts | 11 +++++------ 5 files changed, 29 insertions(+), 27 deletions(-) diff --git a/allure-junit-platform/build.gradle.kts b/allure-junit-platform/build.gradle.kts index a4b970826..417709e6b 100644 --- a/allure-junit-platform/build.gradle.kts +++ b/allure-junit-platform/build.gradle.kts @@ -40,14 +40,15 @@ tasks.test { } } -val spiOffJar by tasks.creating(Jar::class) { +val spiOffJar: Jar by tasks.creating(Jar::class) { from(sourceSets.getByName("main").output) - classifier = "spi-off" + archiveClassifier.set("spi-off") } -val spiOff by configurations.creating { - extendsFrom(configurations.getByName("compile")) +publishing { + publications { + named("maven") { + artifact(spiOffJar) + } + } } - -artifacts.add("archives", spiOffJar) -artifacts.add("spiOff", spiOffJar) diff --git a/allure-junit5/build.gradle.kts b/allure-junit5/build.gradle.kts index 91499fd26..0b63accf3 100644 --- a/allure-junit5/build.gradle.kts +++ b/allure-junit5/build.gradle.kts @@ -38,15 +38,16 @@ tasks.test { } } -val spiOffJar by tasks.creating(Jar::class) { +val spiOffJar: Jar by tasks.creating(Jar::class) { from(sourceSets.getByName("main").output) archiveClassifier.set("spi-off") } -val spiOff by configurations.creating { - extendsFrom(configurations.getByName("compile")) +publishing { + publications { + named("maven") { + artifact(spiOffJar) + } + } } -artifacts.add("archives", spiOffJar) -artifacts.add("spiOff", spiOffJar) - diff --git a/allure-model/build.gradle.kts b/allure-model/build.gradle.kts index 507dfdf45..9b5fb34fd 100644 --- a/allure-model/build.gradle.kts +++ b/allure-model/build.gradle.kts @@ -4,7 +4,7 @@ val agent: Configuration by configurations.creating dependencies { agent("org.aspectj:aspectjweaver") - implementation("com.fasterxml.jackson.core:jackson-databind") + implementation("com.fasterxml.jackson.core:jackson-databind:2.12.2") testImplementation("io.github.benas:random-beans") testImplementation("org.assertj:assertj-core") testImplementation("org.junit.jupiter:junit-jupiter-api") diff --git a/allure-testng/build.gradle.kts b/allure-testng/build.gradle.kts index c48c6d44c..f6b2d0107 100644 --- a/allure-testng/build.gradle.kts +++ b/allure-testng/build.gradle.kts @@ -39,14 +39,15 @@ tasks.test { } } -val spiOffJar by tasks.creating(Jar::class) { +val spiOffJar: Jar by tasks.creating(Jar::class) { from(sourceSets.getByName("main").output) - classifier = "spi-off" + archiveClassifier.set("spi-off") } -val spiOff by configurations.creating { - extendsFrom(configurations.getByName("compile")) +publishing { + publications { + named("maven") { + artifact(spiOffJar) + } + } } - -artifacts.add("archives", spiOffJar) -artifacts.add("spiOff", spiOffJar) diff --git a/build.gradle.kts b/build.gradle.kts index 9eb2c9c33..9d420886a 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -12,8 +12,6 @@ buildscript { dependencies { classpath("com.diffplug.spotless:spotless-plugin-gradle:5.12.4") - classpath("com.jfrog.bintray.gradle:gradle-bintray-plugin:1.8.5") - classpath("io.spring.gradle:dependency-management-plugin:1.0.11.RELEASE") classpath("ru.vyarus:gradle-quality-plugin:4.5.0") } } @@ -36,6 +34,7 @@ plugins { java `java-library` `maven-publish` + id("io.spring.dependency-management") version "1.0.11.RELEASE" id("io.qameta.allure") version "2.8.1" } @@ -209,12 +208,12 @@ configure(subprojects) { tasks.withType(Javadoc::class) { (options as StandardJavadocDocletOptions).addStringOption("Xdoclint:none", "-quiet") } - + publishing { publications { create("maven") { from(components["java"]) - + suppressAllPomMetadataWarnings() pom { name.set(project.description) description.set(project.description) @@ -229,12 +228,12 @@ configure(subprojects) { developer { id.set("baev") name.set("Dmitry Baev") - email.set("baev@qameta.io") + email.set("dmitry.baev@qameta.io") } developer { id.set("eroshenkoam") name.set("Artem Eroshenko") - email.set("artem@qameta.io") + email.set("artem.eroshenko@qameta.io") } } scm { From eb045cf539376b7157cda38a6352e09ebdba0c73 Mon Sep 17 00:00:00 2001 From: Dmitry Baev Date: Mon, 29 Mar 2021 19:36:11 +0300 Subject: [PATCH 09/23] add name and signing --- .github/workflows/{build.yaml => build.yml} | 0 .../workflows/{release.yaml => publish.yml} | 2 +- .github/workflows/release.yml | 18 ++++++++++++++++++ build.gradle.kts | 8 +++++++- 4 files changed, 26 insertions(+), 2 deletions(-) rename .github/workflows/{build.yaml => build.yml} (100%) rename .github/workflows/{release.yaml => publish.yml} (97%) create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yml similarity index 100% rename from .github/workflows/build.yaml rename to .github/workflows/build.yml diff --git a/.github/workflows/release.yaml b/.github/workflows/publish.yml similarity index 97% rename from .github/workflows/release.yaml rename to .github/workflows/publish.yml index efe3e1716..e686b3276 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/publish.yml @@ -1,4 +1,4 @@ -name: Release +name: Publish on: pull_request: diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 000000000..ed630f050 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,18 @@ +name: Release + +on: + workflow_dispatch: + inputs: + releaseVersion: + description: "The release version in .. format" + required: true + nextVersion: + description: "The next version in . format WITHOUT SNAPSHOT SUFFIX" + required: true + +jobs: + triage: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2.3.4 + diff --git a/build.gradle.kts b/build.gradle.kts index 9d420886a..57a0722eb 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -34,6 +34,7 @@ plugins { java `java-library` `maven-publish` + signing id("io.spring.dependency-management") version "1.0.11.RELEASE" id("io.qameta.allure") version "2.8.1" } @@ -60,6 +61,7 @@ configure(subprojects) { apply(plugin = "java") apply(plugin = "java-library") apply(plugin = "maven-publish") + apply(plugin = "signing") apply(plugin = "io.spring.dependency-management") apply(plugin = "ru.vyarus.quality") apply(plugin = "com.diffplug.spotless") @@ -215,7 +217,7 @@ configure(subprojects) { from(components["java"]) suppressAllPomMetadataWarnings() pom { - name.set(project.description) + name.set(project.name) description.set(project.description) url.set("https://github.com/allure-framework/allure-java") licenses { @@ -261,6 +263,10 @@ configure(subprojects) { } + signing { + sign(publishing.publications["maven"]) + } + repositories { mavenLocal() mavenCentral() From ada0a906b09781fc5f33b421257c02dd0817b9f7 Mon Sep 17 00:00:00 2001 From: Artem Eroshenko Date: Mon, 29 Mar 2021 21:42:01 +0300 Subject: [PATCH 10/23] add gpg keys --- .github/workflows/publish.yml | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index e686b3276..45e4926d6 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -11,16 +11,21 @@ jobs: build: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2.3.4 + - uses: actions/checkout@v2 - name: Set up JDK - uses: actions/setup-java@v2 + uses: actions/setup-java@v1 with: - distribution: 'zulu' - java-version: 8.0.x + java-version: 1.8 + server-id: ossrh + server-username: MAVEN_USERNAME + server-password: MAVEN_PASSWORD + gpg-passphrase: GPG_PASSPHRASE + gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY }} - name: "Gradle Build" - run: ./gradlew build -Pversion=${GITHUB_REF:10} - - name: "Gradle Publish to Bintray" + run: ./gradlew build -Pversion=2.13.9 + - name: Release + run: ./gradlew publish -Pversion=2.13.9 env: - BINTRAY_USER: ${{ secrets.BINTRAY_USER }} - BINTRAY_API_KEY: ${{ secrets.BINTRAY_API_KEY }} - run: ./gradlew bintrayUpload -Pversion=${GITHUB_REF:10} + MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }} + MAVEN_PASSWORD: ${{ secrets.OSSRH_PASSWORD }} + GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }} From a3ea31ddba7be6b2146ee144491a34eb0f9227a3 Mon Sep 17 00:00:00 2001 From: Artem Eroshenko Date: Mon, 29 Mar 2021 21:57:45 +0300 Subject: [PATCH 11/23] add signing key --- gradle.properties | 2 ++ 1 file changed, 2 insertions(+) diff --git a/gradle.properties b/gradle.properties index 1022fe6b1..10048d148 100644 --- a/gradle.properties +++ b/gradle.properties @@ -5,3 +5,5 @@ org.gradle.parallel=true test.maxHeapSize=512m test.maxParallelForks=4 + +signing.keyId=7F30B4B9 From ce2d2e91539a16b109e1450c8f4230d78713886d Mon Sep 17 00:00:00 2001 From: Artem Eroshenko Date: Wed, 28 Apr 2021 22:45:39 +0300 Subject: [PATCH 12/23] add gpg key --- .github/workflows/publish.yml | 19 +++++++++++-------- gradle.properties | 2 -- 2 files changed, 11 insertions(+), 10 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 45e4926d6..e734d17a6 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -16,16 +16,19 @@ jobs: uses: actions/setup-java@v1 with: java-version: 1.8 - server-id: ossrh - server-username: MAVEN_USERNAME - server-password: MAVEN_PASSWORD - gpg-passphrase: GPG_PASSPHRASE - gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY }} + - name: Set up GPG + run: echo ${GPG_PRIVATE_KEY} > ${GPG_KEY_ID} && gpg --dearmor ${GPG_KEY_ID} + env: + GPG_KEY_ID: ${{ secrets.GPG_KEY_ID }} + GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }} - name: "Gradle Build" - run: ./gradlew build -Pversion=2.13.9 - - name: Release - run: ./gradlew publish -Pversion=2.13.9 + run: | + ./gradlew :allure-descriptions-javadoc:signMavenPublication \ + -Psigning.keyId=${GPG_KEY_ID} \ + -Psigning.password=${GPG_PASSPHRASE} \ + -Psigning.secretKeyRingFile=${GPG_KEY_ID}.gpg env: MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }} MAVEN_PASSWORD: ${{ secrets.OSSRH_PASSWORD }} + GPG_KEY_ID: ${{ secrets.GPG_KEY_ID }} GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }} diff --git a/gradle.properties b/gradle.properties index 10048d148..1022fe6b1 100644 --- a/gradle.properties +++ b/gradle.properties @@ -5,5 +5,3 @@ org.gradle.parallel=true test.maxHeapSize=512m test.maxParallelForks=4 - -signing.keyId=7F30B4B9 From 7a8278fa936051508ce57a9e66c10b214d421244 Mon Sep 17 00:00:00 2001 From: Artem Eroshenko Date: Wed, 28 Apr 2021 22:57:25 +0300 Subject: [PATCH 13/23] run on push --- .github/workflows/publish.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index e734d17a6..cd7294d21 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -1,7 +1,7 @@ name: Publish on: - pull_request: + push: branches: - '*' release: From b0781f0a5218deb63d3cf87e750a87d0d27f635d Mon Sep 17 00:00:00 2001 From: Artem Eroshenko Date: Wed, 28 Apr 2021 23:01:46 +0300 Subject: [PATCH 14/23] fix build --- .github/workflows/publish.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index cd7294d21..9d75db75e 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -17,7 +17,10 @@ jobs: with: java-version: 1.8 - name: Set up GPG - run: echo ${GPG_PRIVATE_KEY} > ${GPG_KEY_ID} && gpg --dearmor ${GPG_KEY_ID} + run: | + echo ${GPG_PRIVATE_KEY} > ${GPG_KEY_ID} + ls -al + gpg --dearmor ${GPG_KEY_ID} env: GPG_KEY_ID: ${{ secrets.GPG_KEY_ID }} GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }} From f191a3e4e15ac93e500c135deff1427c60c4a824 Mon Sep 17 00:00:00 2001 From: Artem Eroshenko Date: Wed, 28 Apr 2021 23:11:14 +0300 Subject: [PATCH 15/23] use base64 --- .github/workflows/publish.yml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 9d75db75e..ad404baad 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -17,10 +17,7 @@ jobs: with: java-version: 1.8 - name: Set up GPG - run: | - echo ${GPG_PRIVATE_KEY} > ${GPG_KEY_ID} - ls -al - gpg --dearmor ${GPG_KEY_ID} + run: echo -n "${GPG_PRIVATE_KEY}" | base64 --decode > ${GPG_KEY_ID}.gpg env: GPG_KEY_ID: ${{ secrets.GPG_KEY_ID }} GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }} From eeaf285eb152240e53d9367c79cb5f35ad1bea18 Mon Sep 17 00:00:00 2001 From: Artem Eroshenko Date: Wed, 28 Apr 2021 23:14:04 +0300 Subject: [PATCH 16/23] fix file path --- .github/workflows/publish.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index ad404baad..1e89f89c0 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -26,7 +26,7 @@ jobs: ./gradlew :allure-descriptions-javadoc:signMavenPublication \ -Psigning.keyId=${GPG_KEY_ID} \ -Psigning.password=${GPG_PASSPHRASE} \ - -Psigning.secretKeyRingFile=${GPG_KEY_ID}.gpg + -Psigning.secretKeyRingFile=${WORKSPACE}/${GPG_KEY_ID}.gpg env: MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }} MAVEN_PASSWORD: ${{ secrets.OSSRH_PASSWORD }} From b83d97cab71b12a7d031d034b4142ece0bc7fc93 Mon Sep 17 00:00:00 2001 From: Artem Eroshenko Date: Wed, 28 Apr 2021 23:16:15 +0300 Subject: [PATCH 17/23] totally fix path --- .github/workflows/publish.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 1e89f89c0..d22adb953 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -17,7 +17,7 @@ jobs: with: java-version: 1.8 - name: Set up GPG - run: echo -n "${GPG_PRIVATE_KEY}" | base64 --decode > ${GPG_KEY_ID}.gpg + run: echo -n "${GPG_PRIVATE_KEY}" | base64 --decode > ${GITHUB_WORKSPACE}/${GPG_KEY_ID}.gpg env: GPG_KEY_ID: ${{ secrets.GPG_KEY_ID }} GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }} @@ -26,7 +26,7 @@ jobs: ./gradlew :allure-descriptions-javadoc:signMavenPublication \ -Psigning.keyId=${GPG_KEY_ID} \ -Psigning.password=${GPG_PASSPHRASE} \ - -Psigning.secretKeyRingFile=${WORKSPACE}/${GPG_KEY_ID}.gpg + -Psigning.secretKeyRingFile=${GITHUB_WORKSPACE}/${GPG_KEY_ID}.gpg env: MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }} MAVEN_PASSWORD: ${{ secrets.OSSRH_PASSWORD }} From 473c39c3ef1f84311b6ffded478175cbc1de44bb Mon Sep 17 00:00:00 2001 From: Artem Eroshenko Date: Wed, 28 Apr 2021 23:20:02 +0300 Subject: [PATCH 18/23] try to publish --- .github/workflows/publish.yml | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index d22adb953..b0b6b2bda 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -22,11 +22,13 @@ jobs: GPG_KEY_ID: ${{ secrets.GPG_KEY_ID }} GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }} - name: "Gradle Build" + run: ./gradlew build -Pversion=2.13.10 + - name: "Gradle Publish" run: | - ./gradlew :allure-descriptions-javadoc:signMavenPublication \ - -Psigning.keyId=${GPG_KEY_ID} \ - -Psigning.password=${GPG_PASSPHRASE} \ - -Psigning.secretKeyRingFile=${GITHUB_WORKSPACE}/${GPG_KEY_ID}.gpg + ./gradlew publish -Pversion=2.13.10 \ + -Psigning.keyId=${GPG_KEY_ID} \ + -Psigning.password=${GPG_PASSPHRASE} \ + -Psigning.secretKeyRingFile=${GITHUB_WORKSPACE}/${GPG_KEY_ID}.gpg env: MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }} MAVEN_PASSWORD: ${{ secrets.OSSRH_PASSWORD }} From fa004a79ca66f9506a15f46e3f86933cc5a76ec5 Mon Sep 17 00:00:00 2001 From: Artem Eroshenko Date: Wed, 28 Apr 2021 23:44:18 +0300 Subject: [PATCH 19/23] migrate to sonatype plugin --- .github/workflows/publish.yml | 12 ++++++------ build.gradle.kts | 24 ++++++++++-------------- 2 files changed, 16 insertions(+), 20 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index b0b6b2bda..eae11db25 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -25,12 +25,12 @@ jobs: run: ./gradlew build -Pversion=2.13.10 - name: "Gradle Publish" run: | - ./gradlew publish -Pversion=2.13.10 \ - -Psigning.keyId=${GPG_KEY_ID} \ - -Psigning.password=${GPG_PASSPHRASE} \ - -Psigning.secretKeyRingFile=${GITHUB_WORKSPACE}/${GPG_KEY_ID}.gpg + ./gradlew publishToSonatype -Pversion=2.13.10 \ + -Psigning.keyId=${GPG_KEY_ID} \ + -Psigning.password=${GPG_PASSPHRASE} \ + -Psigning.secretKeyRingFile=${GITHUB_WORKSPACE}/${GPG_KEY_ID}.gpg env: - MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }} - MAVEN_PASSWORD: ${{ secrets.OSSRH_PASSWORD }} + ORG_GRADLE_PROJECT_sonatypeUsername: ${{ secrets.OSSRH_USERNAME }} + ORG_GRADLE_PROJECT_sonatypePassword: ${{ secrets.OSSRH_PASSWORD }} GPG_KEY_ID: ${{ secrets.GPG_KEY_ID }} GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }} diff --git a/build.gradle.kts b/build.gradle.kts index 57a0722eb..c36bd6caa 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -36,6 +36,7 @@ plugins { `maven-publish` signing id("io.spring.dependency-management") version "1.0.11.RELEASE" + id("io.github.gradle-nexus.publish-plugin") version "1.1.0" id("io.qameta.allure") version "2.8.1" } @@ -53,19 +54,25 @@ configure(listOf(rootProject)) { group = "io.qameta.allure" } +nexusPublishing { + repositories { + sonatype() + } +} + configure(subprojects) { val project = this group = "io.qameta.allure" version = version apply(plugin = "java") + apply(plugin = "signing") apply(plugin = "java-library") apply(plugin = "maven-publish") - apply(plugin = "signing") - apply(plugin = "io.spring.dependency-management") + apply(plugin = "io.qameta.allure") apply(plugin = "ru.vyarus.quality") apply(plugin = "com.diffplug.spotless") - apply(plugin = "io.qameta.allure") + apply(plugin = "io.spring.dependency-management") configure { imports { @@ -250,17 +257,6 @@ configure(subprojects) { } } } - repositories { - maven { - name = "OSSRH" - url = uri("https://oss.sonatype.org/service/local/staging/deploy/maven2/") - credentials { - username = System.getenv("MAVEN_USERNAME") - password = System.getenv("MAVEN_PASSWORD") - } - } - } - } signing { From 7d44ce5068f23a986063d4f7d267000610caa2ec Mon Sep 17 00:00:00 2001 From: Artem Eroshenko Date: Thu, 29 Apr 2021 01:02:19 +0300 Subject: [PATCH 20/23] add description --- build.gradle.kts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.gradle.kts b/build.gradle.kts index c36bd6caa..0674a28dd 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -225,7 +225,7 @@ configure(subprojects) { suppressAllPomMetadataWarnings() pom { name.set(project.name) - description.set(project.description) + description.set("Module ${project.name} of Allure Framework.") url.set("https://github.com/allure-framework/allure-java") licenses { license { From 5c17d141af4338e9786117ba69d9a10d36ef213c Mon Sep 17 00:00:00 2001 From: Artem Eroshenko Date: Thu, 29 Apr 2021 13:36:38 +0300 Subject: [PATCH 21/23] remove build event --- .github/workflows/publish.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index eae11db25..717c1d6b3 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -1,9 +1,6 @@ name: Publish on: - push: - branches: - - '*' release: types: [published] From a1f8934d8b0b62d3d2cd7419c90bfc64da837299 Mon Sep 17 00:00:00 2001 From: Artem Eroshenko Date: Thu, 29 Apr 2021 13:45:13 +0300 Subject: [PATCH 22/23] pretify configs --- .github/workflows/build.yml | 4 ++-- .github/workflows/publish.yml | 11 ++++++----- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index f3bb57f3f..7334f99ef 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -15,7 +15,7 @@ jobs: name: "Build JDK 1.8" runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2.3.4 + - uses: actions/checkout@v2 - name: Set up JDK 1.8 uses: actions/setup-java@v2 with: @@ -27,7 +27,7 @@ jobs: name: "Build JDK 11" runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2.3.4 + - uses: actions/checkout@v2 - name: Set up JDK 11 uses: actions/setup-java@v2 with: diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 717c1d6b3..f1e628065 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -9,20 +9,21 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - - name: Set up JDK - uses: actions/setup-java@v1 + - name: Set up JDK 1.8 + uses: actions/setup-java@v2 with: - java-version: 1.8 + distribution: 'zulu' + java-version: 8.0.x - name: Set up GPG run: echo -n "${GPG_PRIVATE_KEY}" | base64 --decode > ${GITHUB_WORKSPACE}/${GPG_KEY_ID}.gpg env: GPG_KEY_ID: ${{ secrets.GPG_KEY_ID }} GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }} - name: "Gradle Build" - run: ./gradlew build -Pversion=2.13.10 + run: ./gradlew build -Pversion=${GITHUB_REF:10} - name: "Gradle Publish" run: | - ./gradlew publishToSonatype -Pversion=2.13.10 \ + ./gradlew publishToSonatype -Pversion=${GITHUB_REF:10} \ -Psigning.keyId=${GPG_KEY_ID} \ -Psigning.password=${GPG_PASSPHRASE} \ -Psigning.secretKeyRingFile=${GITHUB_WORKSPACE}/${GPG_KEY_ID}.gpg From a28561312e90ebdd02fbffc73c303a5904e9bc83 Mon Sep 17 00:00:00 2001 From: Artem Eroshenko Date: Thu, 29 Apr 2021 13:48:50 +0300 Subject: [PATCH 23/23] rename tests --- build.gradle.kts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/build.gradle.kts b/build.gradle.kts index 0674a28dd..b495319c7 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -1,6 +1,5 @@ import com.diffplug.gradle.spotless.SpotlessExtension import io.qameta.allure.gradle.task.AllureReport -import io.spring.gradle.dependencymanagement.dsl.DependencyManagementExtension import ru.vyarus.gradle.plugin.quality.QualityExtension buildscript { @@ -74,7 +73,7 @@ configure(subprojects) { apply(plugin = "com.diffplug.spotless") apply(plugin = "io.spring.dependency-management") - configure { + dependencyManagement { imports { mavenBom("com.fasterxml.jackson:jackson-bom:2.12.3") mavenBom("org.junit:junit-bom:5.7.1")