Skip to content

Commit

Permalink
updated build config for github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] committed Jul 27, 2021
1 parent 8b772ef commit a3c3cf6
Show file tree
Hide file tree
Showing 5 changed files with 183 additions and 99 deletions.
73 changes: 73 additions & 0 deletions .github/workflows/early-access.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
name: EarlyAccess

on:
push:
branches: [ main ]

jobs:
earlyaccess:
name: EarlyAccess
if: github.repository == 'redis-developer/riot' && startsWith(github.event.head_commit.message, 'Releasing version') != true
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0

- name: Set up Java
uses: actions/setup-java@v1
with:
java-version: 11

- 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 -Prelease=true build -S

- name: Version
id: vars
run: echo ::set-output name=version::$(grep "version" gradle.properties | cut -d'=' -f2 | tr -d " ")

- name: Assemble
uses: jreleaser/release-action@v1
with:
version: early-access
arguments: assemble
env:
JRELEASER_PROJECT_VERSION: ${{ steps.vars.outputs.version }}
JRELEASER_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Release
uses: jreleaser/release-action@v1
with:
version: early-access
arguments: full-release
env:
JRELEASER_PROJECT_VERSION: ${{ steps.vars.outputs.version }}
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 }}
JRELEASER_DOCKER_DEFAULT_PASSWORD: ${{ secrets.JRELEASER_DOCKER_PASSWORD }}

- name: JReleaser output
if: always()
uses: actions/upload-artifact@v2
with:
name: artifact
path: |
out/jreleaser/trace.log
out/jreleaser/output.properties
86 changes: 0 additions & 86 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,6 @@ allprojects {
}
mavenLocal()
}

tasks.withType(GenerateModuleMetadata) {
enabled = false
}
Expand All @@ -80,88 +79,3 @@ subprojects {
}
}
}


jreleaser {
project {
longDescription = 'Get data in and out of Redis with RIOT'
website = 'https://developer.redislabs.com/riot'
copyright = '2021 Julien Ruaux'
java {
multiProject = true
}
}
release {
github {
owner = 'redis-developer'
overwrite = true
changelog {
enabled = true
formatted = 'ALWAYS'
change = '- {{commitShortHash}} {{commitTitle}}'
labeler {
label = 'feature'
title = 'Resolves #'
body = 'Resolves #'
}
labeler {
label = 'issue'
title = 'Fixes #'
body = 'Fixes #'
}
labeler {
label = 'issue'
title = 'Relates to #'
body = 'Relates to #'
}
labeler {
label = 'task'
title = '[chore]'
}
category {
title = '🚀 Features'
labels = ['feature']
}
category {
title = '✅ Issues'
labels = ['issue']
}
category {
title = '🧰 Tasks'
labels = ['task']
}
replacer {
search = '\\[chore\\]\\s'
replace = ''
}
}
}
}
distributions {
['riot-db', 'riot-file', 'riot-gen', 'riot-redis', 'riot-stream'].each { n ->
"$n" {
brew {
active = 'release'
formulaName = "${n}"
}
scoop {
active = 'release'
bucket {
name = 'scoop'
}
}
artifacts {
artifact {
path = "connectors/{{distributionName}}/build/distributions/{{distributionName}}-{{projectVersion}}.zip"
}
}
}
}
}
}

nexusPublishing {
repositories {
sonatype()
}
}
21 changes: 10 additions & 11 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
group = com.redislabs
version = 2.12.0
gitPublishPluginVersion = 3.0.0
kordampPluginVersion = 0.46.0
kordampBuildVersion = 2.5.0
jreleaserPluginVersion = 0.4.0
nexusPluginVersion = 1.1.0
picocliVersion = 4.6.1
testcontainersVersion = 1.15.3-REDISLABS
protobufVersion = 3.14.0
googleHttpVersion = 1.38.0
group=com.redislabs
version=2.12.1-SNAPSHOT
gitPublishPluginVersion=3.0.0
kordampPluginVersion=0.46.0
kordampBuildVersion=2.5.0
jreleaserPluginVersion=0.4.0
picocliVersion=4.6.1
testcontainersVersion=1.15.3-REDISLABS
protobufVersion=3.14.0
googleHttpVersion=1.38.0
100 changes: 100 additions & 0 deletions jreleaser.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
project:
name: riot
description: Redis Input/Output Tools
longDescription: Get data in and out of Redis with RIOT
website: https://developer.redislabs.com/riot
authors:
- Julien Ruaux
license: Apache-2.0
java:
groupId: com.redislabs
version: 8
multiProject: true
extraProperties:
inceptionYear: 2020

release:
github:
branch: master
username: jruaux
overwrite: true
changelog:
sort: DESC
formatted: ALWAYS
change: '- {{commitShortHash}} {{commitTitle}}'
labelers:
- label: 'feature'
title: 'Resolves #'
body: 'Resolves #'
- label: 'issue'
title: 'Fixes #'
body: 'Fixes #'
- label: 'issue'
title: 'Relates to #'
body: 'Relates to #'
- label: 'task'
title: '[chore]'
categories:
- title: '🚀 Features'
labels:
- 'feature'
- title: '✅ Issues'
labels:
- 'issue'
- title: '🧰 Tasks'
labels:
- 'task'
replacers:
- search: '\[chore\] '
replace: ''

distributions:
riot-db:
brew:
active: release
scoop:
active: release
bucket:
name: scoop
artifacts:
- path: connectors/{{distributionName}}/build/distributions/{{distributionName}}-{{projectVersion}}.zip

riot-file:
brew:
active: release
scoop:
active: release
bucket:
name: scoop
artifacts:
- path: connectors/{{distributionName}}/build/distributions/{{distributionName}}-{{projectVersion}}.zip

riot-gen:
brew:
active: release
scoop:
active: release
bucket:
name: scoop
artifacts:
- path: connectors/{{distributionName}}/build/distributions/{{distributionName}}-{{projectVersion}}.zip

riot-redis:
brew:
active: release
scoop:
active: release
bucket:
name: scoop
artifacts:
- path: connectors/{{distributionName}}/build/distributions/{{distributionName}}-{{projectVersion}}.zip

riot-stream:
brew:
active: release
scoop:
active: release
bucket:
name: scoop
artifacts:
- path: connectors/{{distributionName}}/build/distributions/{{distributionName}}-{{projectVersion}}.zip
2 changes: 0 additions & 2 deletions settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ buildscript {
classpath "org.kordamp.gradle:kordamp-parentbuild:$kordampBuildVersion"
classpath "org.kordamp.gradle:java-project-gradle-plugin:$kordampPluginVersion"
classpath "org.kordamp.gradle:guide-gradle-plugin:$kordampPluginVersion"
classpath "io.github.gradle-nexus:publish-plugin:$nexusPluginVersion"
classpath "org.jreleaser:jreleaser-gradle-plugin:$jreleaserPluginVersion"
classpath "org.ajoberstar:gradle-git-publish:$gitPublishPluginVersion"
classpath "io.freefair.gradle:lombok-plugin:6.0.0-m2"
Expand All @@ -31,7 +30,6 @@ projects {
path(':') {
id 'org.kordamp.gradle.java-project'
id 'org.jreleaser'
id 'io.github.gradle-nexus.publish-plugin'
}
path(':guide') {
id 'org.kordamp.gradle.guide'
Expand Down

0 comments on commit a3c3cf6

Please sign in to comment.