diff options
author | Matthew Strapp <matt@mattstrapp.net> | 2024-10-29 08:50:02 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-10-29 08:50:02 -0500 |
commit | 3ce816f91a5a7536ce2034af469d68cd9ed7dd7f (patch) | |
tree | 497677594487587932aa9b881a3992d107d5f4e4 /.github/workflows | |
parent | Bump the nodejs-dependencies group with 5 updates (diff) | |
download | locusts-3ce816f91a5a7536ce2034af469d68cd9ed7dd7f.tar locusts-3ce816f91a5a7536ce2034af469d68cd9ed7dd7f.tar.gz locusts-3ce816f91a5a7536ce2034af469d68cd9ed7dd7f.tar.bz2 locusts-3ce816f91a5a7536ce2034af469d68cd9ed7dd7f.tar.lz locusts-3ce816f91a5a7536ce2034af469d68cd9ed7dd7f.tar.xz locusts-3ce816f91a5a7536ce2034af469d68cd9ed7dd7f.tar.zst locusts-3ce816f91a5a7536ce2034af469d68cd9ed7dd7f.zip |
feat: Add Java/JVM (#24)
Signed-off-by: Matt Strapp <matt@mattstrapp.net>
Diffstat (limited to '')
-rw-r--r-- | .github/workflows/jvm.yml | 62 |
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 |