Skip to content

Commit

Permalink
Merge pull request jbake-org#742 from jonbullock/merge/configure-jrel…
Browse files Browse the repository at this point in the history
…easer-737

Manually merge in JReleaser PR
  • Loading branch information
jonbullock committed Jan 5, 2022
2 parents aa14595 + 9afb552 commit 7f594f4
Show file tree
Hide file tree
Showing 11 changed files with 168 additions and 109 deletions.
46 changes: 46 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: Build

on:
pull_request:

jobs:
build:
name: Build
strategy:
fail-fast: false
matrix:
os: [ ubuntu-latest, macos-latest, windows-latest ]
runs-on: ${{ matrix.os }}

steps:
- uses: actions/checkout@v2

- name: Set up Java
uses: actions/setup-java@v2
with:
java-version: 11
distribution: 'zulu'

- uses: actions/cache@v2
with:
path: ~/.gradle/caches
key: ${{ runner.os }}-gradle-cache-${{ hashFiles('**/*.gradle') }}-${{ hashFiles('**/gradle.properties') }}
restore-keys: |
${{ runner.os }}-gradle-
- uses: actions/cache@v2
with:
path: ~/.gradle/wrapper
key: ${{ runner.os }}-gradle-wrapper-${{ hashFiles('**/gradlew') }}
restore-keys: |
${{ runner.os }}-gradlew-
- name: Build
run: ./gradlew build -S

- name: Upload Reports
uses: actions/upload-artifact@v1
if: failure()
with:
name: reports-${{ runner.os }}
path: |
jbake-core/build
jbake-dist/build
55 changes: 55 additions & 0 deletions .github/workflows/early-access.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
name: EarlyAccess

on:
push:
branches: [ master ]

jobs:
earlyaccess:
name: EarlyAccess
if: github.repository == 'jbake-org/jbake'
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0

- name: Set up Java
uses: actions/setup-java@v2
with:
java-version: 11
distribution: 'zulu'

- uses: actions/cache@v2
with:
path: ~/.gradle/caches
key: ${{ runner.os }}-gradle-cache-${{ hashFiles('**/*.gradle') }}-${{ hashFiles('**/gradle.properties') }}
restore-keys: |
${{ runner.os }}-gradle-
- uses: actions/cache@v2
with:
path: ~/.gradle/wrapper
key: ${{ runner.os }}-gradle-wrapper-${{ hashFiles('**/gradlew') }}
restore-keys: |
${{ runner.os }}-gradlew-
- name: Build
run: ./gradlew build -S

- name: Release
run: ./gradlew jreleaserRelease -S
env:
JRELEASER_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
JRELEASER_GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
JRELEASER_GPG_PUBLIC_KEY: ${{ secrets.GPG_PUBLIC_KEY }}
JRELEASER_GPG_SECRET_KEY: ${{ secrets.GPG_SECRET_KEY }}

- name: JReleaser output
if: always()
uses: actions/upload-artifact@v2
with:
name: jreleaser-logs
path: |
jbake-dist/build/jreleaser/trace.log
jbake-dist/build/jreleaser/output.properties
1 change: 1 addition & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ plugins {
id "io.github.gradle-nexus.publish-plugin" version "$nexusPublishPluginVersion"
id 'com.github.ben-manes.versions' version "$versionsPluginVersion"
id 'org.ajoberstar.grgit' version "$grgitVersion"
id 'org.jreleaser' version "$jreleaserVersion" apply false
id "eclipse"
id "idea"
}
Expand Down
4 changes: 2 additions & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,9 @@ jacocoVersion = 0.8.7
grgitVersion = 4.1.1
nexusPublishPluginVersion = 1.1.0
versionsPluginVersion = 0.40.0
sdkmanVersion = 3.0.0
githubReleaseVersion = 2.2.12
optionalBaseVersion = 7.0.0
jreleaserVersion = 0.10.0
mavenPluginDevVersion = 0.3.1

# jbake-maven-plugin dependencies
mavenVersion = 3.8.4
Expand Down
35 changes: 0 additions & 35 deletions gradle/github-releases.gradle

This file was deleted.

58 changes: 58 additions & 0 deletions gradle/release.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
apply plugin: 'org.jreleaser'

// cannot reference project. properties inside jreleaser config block
// as that collides with the "project" DSL element of the config extension
ext.releaseIsDryrun = (project.rootProject.findProperty('dryrun') ?: false).toBoolean()
ext.projectWebsite = project.website

jreleaser {
dryrun = releaseIsDryrun
gitRootSearch = true

project {
website = projectWebsite
authors = ['Jonathan Bullock']
license = 'MIT'
extraProperties.put('inceptionYear', '2012')
}

release {
github {
overwrite = true
branch = 'master'
changelog {
formatted = 'always'
format = '- {{commitShortHash}} {{commitTitle}}'
contributors {
format = '- {{contributorName}}{{#contributorUsernameAsLink}} ({{.}}){{/contributorUsernameAsLink}}'
}
hide {
contributors = ['GitHub']
}
}
}
}

signing {
active = 'always'
armored = true
}

checksum {
individual = true
}

distributions {
jbake {
sdkman {
active = 'release'
}
artifact {
path = 'build/distributions/{{distributionName}}-{{projectVersion}}-bin.zip'
}
artifact {
path = 'build/distributions/{{distributionName}}-{{projectVersion}}.tar'
}
}
}
}
32 changes: 0 additions & 32 deletions gradle/sdkman.gradle

This file was deleted.

20 changes: 0 additions & 20 deletions gradle/signing.gradle

This file was deleted.

1 change: 0 additions & 1 deletion jbake-core/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ plugins {
}

apply from: "$rootDir/gradle/maven-publishing.gradle"
apply from: "$rootDir/gradle/signing.gradle"

description = "The core library of JBake"

Expand Down
18 changes: 1 addition & 17 deletions jbake-dist/build.gradle
Original file line number Diff line number Diff line change
@@ -1,15 +1,10 @@
plugins {
id "io.sdkman.vendors" version "$sdkmanVersion"
id "com.github.breadmoirai.github-release" version "$githubReleaseVersion"
id "org.jbake.convention.java-common"
id 'application'
}

apply from: "$rootDir/gradle/application.gradle"
apply from: "$rootDir/gradle/sdkman.gradle"
apply from: "$rootDir/gradle/signing.gradle"
apply from: "$rootDir/gradle/github-releases.gradle"

apply from: "$rootDir/gradle/release.gradle"
description = "The binary distribution package that bundles JBake cli"

sourceSets {
Expand Down Expand Up @@ -58,17 +53,6 @@ smokeTest {
}
}

task buildChecksum(dependsOn: distZip, group: "distribution") {
description "creates a sha256 checksum file for the distribution"
doLast {
distZip.outputs.files.files.each {
ant.checksum(file: it, fileext: ".sha256", algorithm: "SHA-256", pattern: "{0} {1}")
}
}
}

check.dependsOn smokeTest

distZip.finalizedBy buildChecksum

jar.enabled=false
7 changes: 5 additions & 2 deletions jbake-maven-plugin/build.gradle
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
plugins {
id 'de.benediktritter.maven-plugin-development' version '0.3.1'
id 'de.benediktritter.maven-plugin-development' version "$mavenPluginDevVersion"
id "org.jbake.convention.java-common"
}

group = "org.jbake"

mavenPlugin {
helpMojoPackage = 'org.jbake.maven'
}

apply from: "$rootDir/gradle/maven-publishing.gradle"
apply from: "$rootDir/gradle/signing.gradle"

publishing {
publications {
Expand Down

0 comments on commit 7f594f4

Please sign in to comment.