aboutsummaryrefslogtreecommitdiffstats
path: root/.github
diff options
context:
space:
mode:
Diffstat (limited to '.github')
-rw-r--r--.github/workflows/jvm.yml62
1 files changed, 62 insertions, 0 deletions
diff --git a/.github/workflows/jvm.yml b/.github/workflows/jvm.yml
new file mode 100644
index 0000000..2dbb02f
--- /dev/null
+++ b/.github/workflows/jvm.yml
@@ -0,0 +1,62 @@
+name: JVM
+
+on:
+ push:
+ paths:
+ - "**.java"
+ - "**.kt"
+ - "**.gradle"
+ - ".github/workflows/jvm.yml"
+ pull_request:
+ paths:
+ - "**.java"
+ - "**.kt"
+ - "**.gradle"
+ - ".github/workflows/jvm.yml"
+
+jobs:
+ build-and-test:
+ name: Build and Test
+ runs-on: ${{ matrix.os }}
+ strategy:
+ fail-fast: false
+ matrix:
+ os: [ubuntu-latest, macos-latest, windows-latest]
+
+ steps:
+ - name: Checkout
+ uses: actions/checkout@v4
+ with:
+ lfs: true
+ - name: Setup Java
+ uses: actions/setup-java@v4
+ with:
+ cache: 'gradle'
+ distribution: 'adopt'
+ java-version: '11'
+ - name: Build with Gradle
+ run: ./gradlew build
+
+ publish-preview:
+ name: Publish Preview to GitHub Packages
+ needs: build-and-test
+ if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}
+ runs-on: ubuntu-latest
+ permissions:
+ packages: write
+ contents: read
+ steps:
+ - name: Checkout
+ uses: actions/checkout@v4
+ with:
+ fetch-depth: 0
+ - name: Setup Java
+ uses: actions/setup-java@v4
+ with:
+ cache: 'gradle'
+ distribution: 'adopt'
+ java-version: '11'
+ - name: Build with Gradle
+ run: ./gradlew build
+ - name: Publish the package
+ run: ./gradlew publish \ No newline at end of file