Skip to content

Commit

Permalink
Added Maven Central release to CI. Bumped IF version to 2.0.*. (#27)
Browse files Browse the repository at this point in the history
  • Loading branch information
jverbus committed Apr 8, 2021
1 parent 55f09b9 commit 237aa38
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 48 deletions.
59 changes: 15 additions & 44 deletions .github/workflows/ci.yml
Expand Up @@ -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
Expand All @@ -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 }}
6 changes: 3 additions & 3 deletions gradle/java-publication.gradle
Expand Up @@ -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'
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion 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.*

0 comments on commit 237aa38

Please sign in to comment.