Prepare next development version #2621
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: CI | |
| on: | |
| push: | |
| branches: | |
| - 8.x | |
| pull_request: | |
| branches: | |
| - 8.x | |
| workflow_dispatch: | |
| jobs: | |
| build: | |
| name: OS=${{ matrix.os }}, Java=${{ matrix.java }}, Gradle=${{ matrix.gradle }} | |
| strategy: | |
| matrix: | |
| os: [ ubuntu-latest, windows-latest ] | |
| # Always test on the latest version and some LTS. | |
| java: [ 17, 21, 24 ] | |
| # Test on the minimum Gradle version and the latest. | |
| gradle: [ 8.3, current ] | |
| exclude: | |
| # Gradle 8.3 doesn't support Java 24. | |
| - gradle: 8.3 | |
| java: 24 | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-java@v4 | |
| with: | |
| distribution: 'zulu' | |
| java-version: ${{ matrix.java }} | |
| - uses: gradle/actions/setup-gradle@v4 | |
| - run: ./gradlew build --info "-PtestGradleVersion=${{ matrix.gradle }}" | |
| publish-snapshot: | |
| needs: build | |
| runs-on: ubuntu-latest | |
| if: github.repository == 'GradleUp/shadow' && github.ref == 'refs/heads/main' | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-java@v4 | |
| with: | |
| distribution: 'zulu' | |
| java-version: 21 | |
| - uses: gradle/actions/setup-gradle@v4 | |
| with: | |
| cache-read-only: true | |
| # Disable CC due to https://github.com/gradle/gradle/issues/22779 | |
| - run: ./gradlew publishToMavenCentral --no-configuration-cache | |
| env: | |
| ORG_GRADLE_PROJECT_mavenCentralUsername: ${{ secrets.CENTRAL_PORTAL_USERNAME }} | |
| ORG_GRADLE_PROJECT_mavenCentralPassword: ${{ secrets.CENTRAL_PORTAL_PASSWORD }} |