File tree Expand file tree Collapse file tree 10 files changed +53
-37
lines changed
Expand file tree Collapse file tree 10 files changed +53
-37
lines changed Original file line number Diff line number Diff line change 1+ name : Publish package to the Maven Central Repository
2+ on :
3+ release :
4+ types : [created]
5+ jobs :
6+ publish :
7+ runs-on : ubuntu-latest
8+ steps :
9+ - uses : actions/checkout@v2
10+ - name : Set up Java
11+ uses : actions/setup-java@v2
12+ with :
13+ java-version : ' 11'
14+ distribution : ' adopt'
15+ - name : Publish package
16+ run : gradle publish
17+ env :
18+ OSSRH_USER : ${{ secrets.OSSRH_USER }}
19+ OSSRH_PASSWORD : ${{ secrets.OSSRH_PASSWORD }}
20+ SIGNING_KEY : ${{ secrets.SIGNING_KEY }}
21+ SIGNING_PASSWORD : ${{ secrets.SIGNING_PASSWORD }}
Original file line number Diff line number Diff line change 11build /
22.gradle /
33.idea /
4- deploy.sh
4+ .local /
55out /
Original file line number Diff line number Diff line change 11FROM ubuntu:focal
22
3- RUN apt update && apt install -y sudo
3+ RUN apt update && apt install -y sudo openjdk-11-jdk-headless
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 11plugins {
22 id " com.palantir.git-version" version " 0.12.2"
3- id " com.jfrog.bintray" version " 1.8.4" apply false
4- id " com.github.hierynomus.license" version " 0.15.0" apply false
3+ id " com.github.hierynomus.license" version " 0.16.1" apply false
54}
65
76def versionDetails = versionDetails()
1716subprojects {
1817 apply plugin : " java"
1918 apply plugin : " java-library"
20- apply plugin : " maven-publish"
21- apply plugin : " com.jfrog.bintray"
2219
2320 sourceCompatibility = 1.8
2421 targetCompatibility = 1.8
@@ -30,10 +27,11 @@ subprojects {
3027
3128 version buildVersion
3229 apply from : " ${ rootProject.projectDir} /publishing.gradle"
33- if (! version. endsWith(" -SNAPSHOT" )) {
34- apply from : " ${ rootProject.projectDir} /bintray.gradle"
35- } else {
36- println " Not a tag build. Not configuring bintray."
30+ apply from : " ${ rootProject.projectDir} /signing.gradle"
31+
32+ java {
33+ withJavadocJar()
34+ withSourcesJar()
3735 }
3836
3937 test {
Original file line number Diff line number Diff line change 11distributionBase =GRADLE_USER_HOME
22distributionPath =wrapper/dists
3- distributionUrl =https\://services.gradle.org/distributions/gradle-5.3 .1-bin.zip
3+ distributionUrl =https\://services.gradle.org/distributions/gradle-7 .1-bin.zip
44zipStoreBase =GRADLE_USER_HOME
55zipStorePath =wrapper/dists
Original file line number Diff line number Diff line change @@ -11,5 +11,5 @@ dependencies {
1111 testImplementation project(" :cautils" )
1212 testImplementation project(" :testca" )
1313 testImplementation ' org.mockito:mockito-core:2.23.4'
14- testRuntime ' ch.qos.logback:logback-classic:1.2.3'
14+ testRuntimeOnly ' ch.qos.logback:logback-classic:1.2.3'
1515}
Original file line number Diff line number Diff line change 1+ apply plugin : " maven-publish"
2+
13def scmUrl = ' https://github.com/dajudge/proxybase'
24def pomConfig = {
35 licenses {
@@ -25,7 +27,7 @@ def projectArtifactId = project.name
2527def projectVersion = project. version
2628publishing {
2729 publications {
28- ProxybasePublication (MavenPublication ) {
30+ Proxybase (MavenPublication ) {
2931 from components. java
3032 groupId projectGroupId
3133 artifactId projectArtifactId
@@ -39,6 +41,16 @@ publishing {
3941 }
4042 }
4143 }
44+ repositories {
45+ maven {
46+ name = " OSSRH"
47+ setUrl(" https://s01.oss.sonatype.org/service/local/staging/deploy/maven2" )
48+ credentials {
49+ username = System . getenv(" OSSRH_USER" ) ?: " wrong"
50+ password = System . getenv(" OSSRH_PASSWORD" ) ?: " credentials"
51+ }
52+ }
53+ }
4254}
4355
4456publishToMavenLocal. doFirst {
Original file line number Diff line number Diff line change 1+ apply plugin : " signing"
2+
3+ signing {
4+ def signingKey = System . getenv(" SIGNING_KEY" ) ?: " "
5+ def signingPwd = System . getenv(" SIGNING_PASSWORD" ) ?: " "
6+ useInMemoryPgpKeys(signingKey, signingPwd)
7+ sign publishing. publications
8+ }
Original file line number Diff line number Diff line change 22
33DIR=" $( cd " $( dirname " $0 " ) " ; pwd) " ;
44
5- IMG=" ubuntu:focal "
5+ IMG=" $( docker build -q $DIR /.workbench ) "
66
77if [ " $# " -eq 0 ]; then
88 CMD=bash
You can’t perform that action at this time.
0 commit comments