mirror of
https://github.com/hierynomus/sshj.git
synced 2025-12-06 15:20:54 +03:00
Update builds and release pipeline
This commit is contained in:
13
.github/workflows/gradle.yml
vendored
13
.github/workflows/gradle.yml
vendored
@@ -24,19 +24,6 @@ jobs:
|
|||||||
run: chmod +x gradlew
|
run: chmod +x gradlew
|
||||||
- name: Build with Gradle
|
- name: Build with Gradle
|
||||||
run: ./gradlew check
|
run: ./gradlew check
|
||||||
# java10:
|
|
||||||
# name: Build with Java 10
|
|
||||||
# runs-on: ubuntu-latest
|
|
||||||
# steps:
|
|
||||||
# - uses: actions/checkout@v2
|
|
||||||
# - name: Set up JDK 10
|
|
||||||
# uses: actions/setup-java@v1
|
|
||||||
# with:
|
|
||||||
# java-version: 10
|
|
||||||
# - name: Grant execute permission for gradlew
|
|
||||||
# run: chmod +x gradlew
|
|
||||||
# - name: Build with Gradle
|
|
||||||
# run: ./gradlew check -xanimalsnifferMain -xanimalsnifferTest
|
|
||||||
|
|
||||||
integration:
|
integration:
|
||||||
name: Integration test
|
name: Integration test
|
||||||
|
|||||||
49
.github/workflows/release.yml
vendored
Normal file
49
.github/workflows/release.yml
vendored
Normal file
@@ -0,0 +1,49 @@
|
|||||||
|
name: SSHJ Release
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
tags:
|
||||||
|
- '*'
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: write
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
java12:
|
||||||
|
name: Build with Java 12
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
with:
|
||||||
|
fetch-depth: 0
|
||||||
|
- name: Set up JDK 12
|
||||||
|
uses: actions/setup-java@v1
|
||||||
|
with:
|
||||||
|
java-version: 12
|
||||||
|
- name: Grant execute permission for gradlew
|
||||||
|
run: chmod +x gradlew
|
||||||
|
- name: Build with Gradle
|
||||||
|
run: ./gradlew check
|
||||||
|
release:
|
||||||
|
name: Release
|
||||||
|
needs: [java12]
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
with:
|
||||||
|
fetch-depth: 0
|
||||||
|
- uses: actions/setup-java@v1
|
||||||
|
with:
|
||||||
|
java-version: 12
|
||||||
|
- name: Grant execute permission for gradlew
|
||||||
|
run: chmod +x gradlew
|
||||||
|
- name: Release
|
||||||
|
run: ./gradlew release -Prelease.disableChecks -Prelease.pushTagsOnly -Prelease.customUsername=${{ github.actor }} -Prelease.customPassword=${{ github.token }}
|
||||||
|
env:
|
||||||
|
ORG_GRADLE_PROJECT_signingKey: ${{ secrets.SIGNINGKEY }}
|
||||||
|
ORG_GRADLE_PROJECT_signingKeyId: ${{ secrets.SIGNINGKEYID }}
|
||||||
|
ORG_GRADLE_PROJECT_signingPassword: ${{ secrets.SIGNINGPASSWORD }}
|
||||||
|
ORG_GRADLE_PROJECT_sonatypeUsername: ${{ secrets.OSSRH_USERNAME }}
|
||||||
|
ORG_GRADLE_PROJECT_sonatypePassword: ${{ secrets.OSSRH_PASSWORD }}
|
||||||
|
|
||||||
|
|
||||||
170
build.gradle
170
build.gradle
@@ -6,18 +6,22 @@ plugins {
|
|||||||
id "java"
|
id "java"
|
||||||
id "groovy"
|
id "groovy"
|
||||||
id "jacoco"
|
id "jacoco"
|
||||||
id "com.github.blindpirate.osgi" version '0.0.3'
|
id "com.github.blindpirate.osgi" version '0.0.6'
|
||||||
id "maven-publish"
|
id "maven-publish"
|
||||||
id 'pl.allegro.tech.build.axion-release' version '1.11.0'
|
id "signing"
|
||||||
id "com.bmuschko.docker-remote-api" version "6.4.0"
|
id 'pl.allegro.tech.build.axion-release' version '1.13.3'
|
||||||
id "com.github.hierynomus.license" version "0.12.1"
|
id "com.bmuschko.docker-remote-api" version "7.1.0"
|
||||||
id "com.jfrog.bintray" version "1.8.5"
|
id "com.github.hierynomus.license" version "0.16.1"
|
||||||
id 'ru.vyarus.java-lib' version '1.0.5'
|
id 'ru.vyarus.github-info' version '1.2.0'
|
||||||
// id 'ru.vyarus.pom' version '1.0.3'
|
id "io.github.gradle-nexus.publish-plugin" version "1.0.0"
|
||||||
id 'ru.vyarus.github-info' version '1.1.0'
|
}
|
||||||
|
|
||||||
|
repositories {
|
||||||
|
mavenCentral()
|
||||||
}
|
}
|
||||||
|
|
||||||
group = "com.hierynomus"
|
group = "com.hierynomus"
|
||||||
|
defaultTasks ["build"]
|
||||||
ext.moduleName = "${project.group}.${project.name}"
|
ext.moduleName = "${project.group}.${project.name}"
|
||||||
|
|
||||||
scmVersion {
|
scmVersion {
|
||||||
@@ -33,13 +37,7 @@ scmVersion {
|
|||||||
|
|
||||||
project.version = scmVersion.version
|
project.version = scmVersion.version
|
||||||
|
|
||||||
defaultTasks "build"
|
configurations.implementation.transitive = false
|
||||||
|
|
||||||
repositories {
|
|
||||||
mavenCentral()
|
|
||||||
}
|
|
||||||
|
|
||||||
configurations.compile.transitive = false
|
|
||||||
|
|
||||||
def bouncycastleVersion = "1.69"
|
def bouncycastleVersion = "1.69"
|
||||||
def sshdVersion = "2.1.0"
|
def sshdVersion = "2.1.0"
|
||||||
@@ -85,7 +83,6 @@ if (JavaVersion.current().isJava8Compatible()) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
compileJava {
|
compileJava {
|
||||||
options.compilerArgs.addAll(['--release', '7'])
|
options.compilerArgs.addAll(['--release', '7'])
|
||||||
}
|
}
|
||||||
@@ -123,6 +120,12 @@ jar {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
java {
|
||||||
|
withJavadocJar()
|
||||||
|
withSourcesJar()
|
||||||
|
}
|
||||||
|
|
||||||
sourcesJar {
|
sourcesJar {
|
||||||
manifest {
|
manifest {
|
||||||
attributes(
|
attributes(
|
||||||
@@ -188,71 +191,82 @@ github {
|
|||||||
license 'Apache'
|
license 'Apache'
|
||||||
}
|
}
|
||||||
|
|
||||||
pom {
|
publishing {
|
||||||
description "SSHv2 library for Java"
|
publications {
|
||||||
url "https://github.com/hierynomus/sshj"
|
maven(MavenPublication) {
|
||||||
inceptionYear "2009"
|
from(components.java)
|
||||||
developers {
|
}
|
||||||
developer {
|
}
|
||||||
id "hierynomus"
|
|
||||||
name "Jeroen van Erp"
|
|
||||||
email "jeroen@javadude.nl"
|
|
||||||
roles {
|
|
||||||
role "Lead developer"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
developer {
|
|
||||||
id "shikhar"
|
|
||||||
name "Shikhar Bhushan"
|
|
||||||
email "shikhar@schmizz.net"
|
|
||||||
url "http://schmizz.net"
|
|
||||||
roles {
|
|
||||||
role "Previous lead developer"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
developer {
|
|
||||||
id "iterate"
|
|
||||||
name "David Kocher"
|
|
||||||
email "dkocher@iterate.ch"
|
|
||||||
organization "iterage GmbH"
|
|
||||||
organizationUrl "https://iterate.ch"
|
|
||||||
roles {
|
|
||||||
role "Developer"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (project.hasProperty("bintrayUsername") && project.hasProperty("bintrayApiKey")) {
|
project.signing {
|
||||||
bintray {
|
required { project.gradle.taskGraph.hasTask("release") }
|
||||||
user = project.property("bintrayUsername")
|
sign publishing.publications.maven
|
||||||
key = project.property("bintrayApiKey")
|
|
||||||
publish = true
|
if (project.hasProperty("signingKeyId") || project.hasProperty("signingKey")) {
|
||||||
publications = ["maven"]
|
def signingKeyId = project.findProperty("signingKeyId")
|
||||||
pkg {
|
def signingKey = project.findProperty("signingKey")
|
||||||
repo = "maven"
|
def signingPassword = project.findProperty("signingPassword")
|
||||||
name = "${project.name}"
|
if (signingKeyId) {
|
||||||
licenses = ["Apache-2.0"]
|
useInMemoryPgpKeys(signingKeyId, signingKey, signingPassword)
|
||||||
vcsUrl = "https://github.com/hierynomus/sshj.git"
|
} else if (signingKey) {
|
||||||
labels = ["ssh", "sftp", "secure-shell", "network", "file-transfer"]
|
useInMemoryPgpKeys(signingKey, signingPassword)
|
||||||
githubRepo = "hierynomus/sshj"
|
}
|
||||||
version {
|
}
|
||||||
name = "${project.version}"
|
}
|
||||||
vcsTag = "v${project.version}"
|
|
||||||
released = new SimpleDateFormat('yyyy-MM-dd\'T\'HH:mm:ss.SSSZZ').format(new Date())
|
project.plugins.withType(MavenPublishPlugin).all {
|
||||||
gpg {
|
PublishingExtension publishing = project.extensions.getByType(PublishingExtension)
|
||||||
sign = true
|
publishing.publications.withType(MavenPublication).all { mavenPublication ->
|
||||||
passphrase = project.property("signing.password")
|
mavenPublication.pom {
|
||||||
}
|
name = "${project.name}"
|
||||||
mavenCentralSync {
|
description = 'SSHv2 library for Java'
|
||||||
sync = true
|
inceptionYear = '2009'
|
||||||
user = project.property("sonatypeUsername")
|
url = "https://github.com/hierynomus/${project.name}"
|
||||||
password = project.property("sonatypePassword")
|
licenses {
|
||||||
close = 1
|
license {
|
||||||
|
name = "The Apache License, Version 2.0"
|
||||||
|
url = "https://www.apache.org/licenses/LICENSE-2.0"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
developers {
|
||||||
|
developer {
|
||||||
|
id = "hierynomus"
|
||||||
|
name = "Jeroen van Erp"
|
||||||
|
email = "jeroen@hierynomus.com"
|
||||||
|
}
|
||||||
|
developer {
|
||||||
|
id = "shikhar"
|
||||||
|
name = "Shikhar Bhushan"
|
||||||
|
email = "shikhar@schmizz.net"
|
||||||
|
url = "http://schmizz.net"
|
||||||
|
roles = ["Previous Lead developer"]
|
||||||
|
}
|
||||||
|
developer {
|
||||||
|
id = "iterate"
|
||||||
|
name = "David Kocher"
|
||||||
|
email = "dkocher@iterate.ch"
|
||||||
|
organization = "iterate GmbH"
|
||||||
|
organizationUrl = "https://iterate.ch"
|
||||||
|
roles = ["Developer"]
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
scm {
|
||||||
|
url = "https://github.com/hierynomus/${project.name}"
|
||||||
|
connection = "scm:git@github.com:hierynomus/${project.name}.git"
|
||||||
|
developerConnection = "scm:git@github.com:hierynomus/${project.name}.git"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
nexusPublishing {
|
||||||
|
repositories {
|
||||||
|
sonatype() //sonatypeUsername and sonatypePassword properties are used automatically
|
||||||
|
}
|
||||||
|
|
||||||
|
connectTimeout = Duration.ofMinutes(3)
|
||||||
|
clientTimeout = Duration.ofMinutes(3)
|
||||||
}
|
}
|
||||||
|
|
||||||
jacocoTestReport {
|
jacocoTestReport {
|
||||||
@@ -295,7 +309,7 @@ task stopItestContainer(type: DockerStopContainer) {
|
|||||||
|
|
||||||
task forkedUploadRelease(type: GradleBuild) {
|
task forkedUploadRelease(type: GradleBuild) {
|
||||||
buildFile = project.buildFile
|
buildFile = project.buildFile
|
||||||
tasks = ["bintrayUpload"]
|
tasks = ["clean", "publishToSonatype", "closeAndReleaseSonatypeStagingRepository"]
|
||||||
}
|
}
|
||||||
|
|
||||||
project.tasks.integrationTest.dependsOn(startItestContainer)
|
project.tasks.integrationTest.dependsOn(startItestContainer)
|
||||||
|
|||||||
2
gradle/wrapper/gradle-wrapper.properties
vendored
2
gradle/wrapper/gradle-wrapper.properties
vendored
@@ -1,5 +1,5 @@
|
|||||||
distributionBase=GRADLE_USER_HOME
|
distributionBase=GRADLE_USER_HOME
|
||||||
distributionPath=wrapper/dists
|
distributionPath=wrapper/dists
|
||||||
distributionUrl=https\://services.gradle.org/distributions/gradle-6.4-bin.zip
|
distributionUrl=https\://services.gradle.org/distributions/gradle-7.0-bin.zip
|
||||||
zipStoreBase=GRADLE_USER_HOME
|
zipStoreBase=GRADLE_USER_HOME
|
||||||
zipStorePath=wrapper/dists
|
zipStorePath=wrapper/dists
|
||||||
|
|||||||
Reference in New Issue
Block a user