diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b1a7b51..c607f21 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -47,6 +47,20 @@ jobs: SCALA_VERSION: ${{ matrix.scala-version }} SPARK_VERSION: ${{ matrix.spark-version }} run: ./gradlew build publishToMavenLocal -s -PscalaVersion=$SCALA_VERSION -PsparkVersion=$SPARK_VERSION + - name: Release to Maven Central + # Release job, only for pushes to the main development branch + if: github.event_name == 'push' + && github.ref == 'refs/heads/master' + && github.repository == 'linkedin/isolation-forest' + && !contains(toJSON(github.event.commits.*.message), '[skip release]') + run: ./gradlew publishToSonatype closeAndReleaseStagingRepository -s -PscalaVersion=$SCALA_VERSION -PsparkVersion=$SPARK_VERSION + env: + SCALA_VERSION: ${{ matrix.scala-version }} + SPARK_VERSION: ${{ matrix.spark-version }} + SONATYPE_USER: ${{ secrets.SONATYPE_USER }} + SONATYPE_PWD: ${{ secrets.SONATYPE_PWD }} + PGP_KEY: ${{ secrets.PGP_KEY }} + PGP_PWD: ${{ secrets.PGP_PWD }} github-release: runs-on: ubuntu-latest @@ -67,50 +81,7 @@ jobs: uses: actions/setup-java@v1 with: java-version: 1.8 - - name: Release + - name: Release to GitHub run: ./gradlew githubRelease -s env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - -# release: -# runs-on: ubuntu-latest -# strategy: -# matrix: -# include: -# - scala-version: 2.11.8 -# spark-version: 2.3.0 -# - scala-version: 2.11.8 -# spark-version: 2.4.3 -# - scala-version: 2.12.11 -# spark-version: 2.4.3 -# - scala-version: 2.12.11 -# spark-version: 3.0.0 -# if: "! contains(toJSON(github.event.commits.*.message), '[skip ci]')" -# steps: -# - name: Check out code -# uses: actions/checkout@v2 # https://github.com/actions/checkout -# with: -# fetch-depth: '0' # https://github.com/shipkit/shipkit-changelog#fetch-depth-on-ci -# - name: Set up Java -# uses: actions/setup-java@v1 -# with: -# java-version: 1.8 -# - name: Perform build -# env: -# SCALA_VERSION: ${{ matrix.scala-version }} -# SPARK_VERSION: ${{ matrix.spark-version }} -# run: ./gradlew build publishToMavenLocal -s -PscalaVersion=$SCALA_VERSION -PsparkVersion=$SPARK_VERSION -# - name: Perform release -# # Release job, only for pushes to the main development branch -# if: github.event_name == 'push' -# && github.ref == 'refs/heads/master' -# && github.repository == 'linkedin/isolation-forest' -# && !contains(toJSON(github.event.commits.*.message), '[skip release]') -# run: ./gradlew publishToSonatype closeAndReleaseStagingRepository -s -PscalaVersion=$SCALA_VERSION -PsparkVersion=$SPARK_VERSION -# env: -# SCALA_VERSION: ${{ matrix.scala-version }} -# SPARK_VERSION: ${{ matrix.spark-version }} -# SONATYPE_USER: ${{ secrets.SONATYPE_USER }} -# SONATYPE_PWD: ${{ secrets.SONATYPE_PWD }} -# PGP_KEY: ${{ secrets.PGP_KEY }} -# PGP_PWD: ${{ secrets.PGP_PWD }} diff --git a/gradle/java-publication.gradle b/gradle/java-publication.gradle index b189b1e..bae2668 100644 --- a/gradle/java-publication.gradle +++ b/gradle/java-publication.gradle @@ -67,11 +67,11 @@ publishing { } issueManagement { url = 'https://github.com/linkedin/isolation-forest/issues' - system = 'GitHub issues' + system = 'GitHub Issues' } ciManagement { - url = 'https://travis-ci.com/linkedin/isolation-forest' - system = 'Travis CI' + url = 'https://github.com/linkedin/isolation-forest/actions/workflows/ci.yml' + system = 'GitHub Actions' } } } diff --git a/version.properties b/version.properties index fdb7ee5..27558af 100644 --- a/version.properties +++ b/version.properties @@ -1,3 +1,3 @@ # Version of the produced binaries. # The version is inferred by shipkit-auto-version Gradle plugin (https://github.com/shipkit/shipkit-auto-version). -version=1.0.* +version=2.0.*