diff --git a/.github/workflows/early-access.yml b/.github/workflows/early-access.yml new file mode 100644 index 000000000..28f07702e --- /dev/null +++ b/.github/workflows/early-access.yml @@ -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 diff --git a/build.gradle b/build.gradle index 516b4c9d2..04719c379 100644 --- a/build.gradle +++ b/build.gradle @@ -67,7 +67,6 @@ allprojects { } mavenLocal() } - tasks.withType(GenerateModuleMetadata) { enabled = false } @@ -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() - } -} diff --git a/gradle.properties b/gradle.properties index adef5e852..e22449378 100644 --- a/gradle.properties +++ b/gradle.properties @@ -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 diff --git a/jreleaser.yml b/jreleaser.yml new file mode 100644 index 000000000..f8b05f509 --- /dev/null +++ b/jreleaser.yml @@ -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 diff --git a/settings.gradle b/settings.gradle index 994144cdb..c5f7410d1 100644 --- a/settings.gradle +++ b/settings.gradle @@ -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" @@ -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'