Skip to content

Commit

Permalink
Merge pull request #2 from agorapulse/chore/publish-to-maven-central
Browse files Browse the repository at this point in the history
publishing to Maven Central
  • Loading branch information
musketyr authored Sep 17, 2021
2 parents cd89459 + fa2350d commit 5d4e66a
Show file tree
Hide file tree
Showing 7 changed files with 60 additions and 47 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/gradle-versions-watchdog.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
CI: true

steps:
- uses: actions/checkout@v1
- uses: actions/checkout@v2

- name: Set up JDK 1.8
uses: actions/setup-java@v1
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/gradle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}

steps:
- uses: actions/checkout@v1
- uses: actions/checkout@v2

- name: Set up JDK 1.8
uses: actions/setup-java@v1
Expand Down
35 changes: 24 additions & 11 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,29 @@ jobs:
env:
GRADLE_OPTS: "-Xmx6g -Xms4g"
steps:
- uses: actions/checkout@v1
- name: Set up JDK 1.8
uses: actions/setup-java@v1
with:
java-version: 1.8
- name: Semantic Version
id: version
uses: ncipollo/semantic-version-action@v1
- uses: eskatos/gradle-command-action@v1
with:
arguments: gitPublishPush bintrayUpload -PbintrayUsername=${{ secrets.BINTRAY_USER }} -PbintrayApiKey=${{ secrets.BINTRAY_KEY }} -Pversion=${{ steps.version.outputs.tag }} -Prelease=true -Dorg.ajoberstar.grgit.auth.username=${{ secrets.AGORAPULSE_BOT_PERSONAL_TOKEN }} --stacktrace
- uses: actions/checkout@v2
- name: Set up JDK 1.8
uses: actions/setup-java@v1
with:
java-version: 1.8
- name: Semantic Version
id: version
uses: ncipollo/semantic-version-action@v1
- name: Decode PGP
id: write_file
uses: timheuer/base64-to-file@v1
with:
fileName: 'secret.pgp'
encodedString: ${{ secrets.SIGNING_SECRET_KEY_BASE64 }}
- uses: eskatos/gradle-command-action@v1
env:
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
SIGNING_KEY_ID: ${{ secrets.SIGNING_KEY_ID }}
SIGNING_PASSWORD: ${{ secrets.SIGNING_PASSWORD }}
SIGNING_SECRET_KEY_PATH: ${{ steps.write_file.outputs.filePath }}
with:
arguments: gitPublishPush publishToSonatype closeAndReleaseSonatypeStagingRepository -Pversion=${{ steps.version.outputs.tag }} -Prelease=true -Dorg.ajoberstar.grgit.auth.username=${{ secrets.AGORAPULSE_BOT_PERSONAL_TOKEN }} --stacktrace
ping:
name: Notify Upstream Repositories
runs-on: ubuntu-latest
Expand All @@ -29,6 +41,7 @@ jobs:
matrix:
repository:
- agorapulse/agorapulse-bom
- agorapulse/agorapulse-oss
steps:
- uses: actions/checkout@v1
- name: Semantic Version
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Micronaut Rethrow

[![Build Status](https://github.com/agorapulse/micronaut-rethrow/workflows/Check/badge.svg)](https://github.com/agorapulse/micronaut-rethrow/actions)
[![Download](https://api.bintray.com/packages/agorapulse/libs/micronaut-rethrow/images/download.svg)](https://bintray.com/agorapulse/libs/micronaut-rethrow/_latestVersion)
[![Maven Central](https://img.shields.io/maven-central/v/com.agorapulse/micronaut-rethrow.svg?label=Maven%20Central)](https://search.maven.org/search?q=g:%22com.agorapulse%22%20AND%20a:%22micronaut-rethrow%22)
[![Coverage Status](https://coveralls.io/repos/github/agorapulse/micronaut-rethrow/badge.svg?branch=master)](https://coveralls.io/github/agorapulse/micronaut-rethrow?branch=master)

Micronaut Rethrow Library
Expand Down
46 changes: 23 additions & 23 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,17 @@
*/
plugins {
id 'org.kordamp.gradle.groovy-project'
id 'org.kordamp.gradle.bintray'
id 'org.kordamp.gradle.checkstyle'
id 'org.kordamp.gradle.codenarc'
id 'org.kordamp.gradle.coveralls'
id 'io.github.gradle-nexus.publish-plugin'
}

if (!project.hasProperty('bintrayUsername')) ext.bintrayUsername = '**UNDEFINED**'
if (!project.hasProperty('bintrayApiKey')) ext.bintrayApiKey = '**UNDEFINED**'
if (!project.hasProperty('ossrhUsername')) ext.ossrhUsername = System.getenv('SONATYPE_USERNAME') ?: '**UNDEFINED**'
if (!project.hasProperty('ossrhPassword')) ext.ossrhPassword = System.getenv('SONATYPE_PASSWORD') ?: '**UNDEFINED**'
if (!project.hasProperty('signingKeyId')) ext.signingKeyId = System.getenv('SIGNING_KEY_ID') ?: '**UNDEFINED**'
if (!project.hasProperty('signingPassword')) ext.signingPassword = System.getenv('SIGNING_PASSWORD') ?: '**UNDEFINED**'
if (!project.hasProperty('signingSecretKey')) ext.signingSecretKey = System.getenv('SIGNING_SECRET_KEY_PATH') ? rootProject.file(System.getenv('SIGNING_SECRET_KEY_PATH')).text : '**UNDEFINED**'

config {
release = (rootProject.findProperty('release') ?: false).toBoolean()
Expand Down Expand Up @@ -69,23 +72,17 @@ config {
}

publishing {
signing = false
enabled = false
signing {
enabled = true
keyId = signingKeyId
secretKey = signingSecretKey
password = signingPassword
}
releasesRepository = 'localRelease'
snapshotsRepository = 'localSnapshot'
}

bintray {
credentials {
username = bintrayUsername
password = bintrayApiKey
}
// TODO: replace
userOrg = 'agorapulse'
repo = 'libs'
name = 'micronaut-rethrow'
publish = true
}

quality {
checkstyle {
toolVersion = '8.27'
Expand All @@ -107,6 +104,15 @@ config {

}

nexusPublishing {
repositories {
sonatype {
username = ossrhUsername
password = ossrhPassword
}
}
}

allprojects {
repositories {
mavenCentral()
Expand All @@ -128,12 +134,6 @@ projects {
mavenCentral()
}

config {
bintray {
name = subproject.name
}
}

// location independent tests (useful for stable CI builds)
tasks.withType(Test){
systemProperty 'user.timezone', 'UTC'
Expand Down Expand Up @@ -178,7 +178,7 @@ projects {
}

config {
bintray {
publishing {
enabled = true
}
}
Expand Down
3 changes: 2 additions & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@
slug=agorapulse/micronaut-rethrow
group=com.agorapulse
version=1.0.0-SNAPSHOT
kordampPluginVersion=0.44.0
kordampPluginVersion=0.46.0
nexusPluginVersion=1.0.0
gitPublishPluginVersion=2.1.3

groovyVersion=2.5.14
Expand Down
17 changes: 8 additions & 9 deletions settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -17,19 +17,18 @@
*/
buildscript {
repositories {
jcenter()
mavenCentral()
gradlePluginPortal()
}
dependencies {
classpath group: 'org.kordamp.gradle', name: 'settings-gradle-plugin', version: kordampPluginVersion
classpath group: 'org.kordamp.gradle', name: 'groovy-project-gradle-plugin', version: kordampPluginVersion
classpath group: 'org.kordamp.gradle', name: 'bintray-gradle-plugin', version: kordampPluginVersion
classpath group: 'org.kordamp.gradle', name: 'checkstyle-gradle-plugin', version: kordampPluginVersion
classpath group: 'org.kordamp.gradle', name: 'codenarc-gradle-plugin', version: kordampPluginVersion
classpath group: 'org.kordamp.gradle', name: 'guide-gradle-plugin', version: kordampPluginVersion
classpath group: 'org.kordamp.gradle', name: 'coveralls-gradle-plugin', version: kordampPluginVersion
classpath group: 'org.ajoberstar', name: 'gradle-git-publish', version: gitPublishPluginVersion
classpath group: 'org.kordamp.gradle', name: 'settings-gradle-plugin', version: kordampPluginVersion
classpath group: 'org.kordamp.gradle', name: 'groovy-project-gradle-plugin', version: kordampPluginVersion
classpath group: 'org.kordamp.gradle', name: 'checkstyle-gradle-plugin', version: kordampPluginVersion
classpath group: 'org.kordamp.gradle', name: 'codenarc-gradle-plugin', version: kordampPluginVersion
classpath group: 'org.kordamp.gradle', name: 'guide-gradle-plugin', version: kordampPluginVersion
classpath group: 'org.kordamp.gradle', name: 'coveralls-gradle-plugin', version: kordampPluginVersion
classpath group: 'org.ajoberstar', name: 'gradle-git-publish', version: gitPublishPluginVersion
classpath group: 'io.github.gradle-nexus', name: 'publish-plugin', version: nexusPluginVersion
}
}

Expand Down

0 comments on commit 5d4e66a

Please sign in to comment.