Skip to content

[#2655] improvement(CI): Add a step in CI pipeline to verify gradle publishToMavenLocal #4

[#2655] improvement(CI): Add a step in CI pipeline to verify gradle publishToMavenLocal

[#2655] improvement(CI): Add a step in CI pipeline to verify gradle publishToMavenLocal #4

Workflow file for this run

name: Gradle publish to local check
# Controls when the workflow will run
on:
# Triggers the workflow on push or pull request events but only for the "main" branch
push:
branches: [ "main", "branch-*" ]
pull_request:
branches: [ "main", "branch-*" ]
concurrency:
group: ${{ github.worklfow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: ${{ github.event_name == 'pull_requests' }}
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
changes:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: dorny/paths-filter@v2
id: filter
with:
filters: |
source_changes:
- '.github/**'
- '**/*.java'
- '**/*.kts'
outputs:
source_changes: ${{ steps.filter.outputs.source_changes }}
publish-check:
runs-on: ubuntu-latest
strategy:
matrix:
java-version: [ 8, 11, 17 ]
needs: changes
if: needs.changes.outputs.source_changes == 'true'
steps:
- uses: actions/checkout@v3
- uses: actions/setup-java@v3
with:
java-version: 8
distribution: 'temurin'
- name: Build with Gradle
run: ./gradlew publishToMavenLocal -PjdkVersion=${{ matrix.java-version }}