-
Notifications
You must be signed in to change notification settings - Fork 4
51 lines (43 loc) · 1.72 KB
/
ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
name: Build and Publish
on:
push:
pull_request:
workflow_dispatch:
env:
GRADLE_OPTS: "-Dorg.gradle.jvmargs=-Xmx4g -Dorg.gradle.daemon=false -Dkotlin.incremental=false"
jobs:
build:
name: Build and Publish
runs-on: ubuntu-latest
strategy:
matrix:
scala: [ '2.12.15', '2.13.8' ]
spark: [ '3.2.4', '3.3.3', '3.4.1', '3.5.0' ]
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Validate Gradle Wrapper
uses: gradle/wrapper-validation-action@v1
- name: Configure JDK
uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: 11
cache: 'gradle'
- name: Build and Test
env:
JOOM_CLOUD_TOKEN: ${{ secrets.JOOM_CLOUD_TOKEN }}
run: ./gradlew build -Pscala.version=${{ matrix.scala }} -Pspark.version=${{ matrix.spark }} -i
- name: Upload Artifacts
if: contains(github.ref, '/tags/v') && matrix.spark == '3.5.0'
run: |
./gradlew publishMavenPublicationToSonatypeRepository \
-Pscala.version=${{ matrix.scala }} \
-Pspark.version=${{ matrix.spark}} \
-Ppublication.repository.maven.name=Sonatype \
-Ppublication.repository.maven.url=https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/ \
-Ppublication.repository.maven.username=${{ secrets.SONATYPE_USERNAME }} \
-Ppublication.repository.maven.password=${{ secrets.SONATYPE_PASSWORD }} \
-Ppublication.signing.keyId=${{ secrets.SIGNING_KEY_ID }} \
-Ppublication.signing.password=${{ secrets.SIGNING_PASSWORD }} \
-Ppublication.signing.secretKey='${{ secrets.SIGNING_SECRET_KEY }}'