Update Gradle Wrapper from 8.5 to 8.6 #19
Workflow file for this run
This file contains 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: Build & Test & Release | |
on: | |
workflow_dispatch: | |
workflow_call: | |
push: | |
pull_request: | |
permissions: | |
checks: write | |
pull-requests: write | |
jobs: | |
init: | |
name: Init | |
runs-on: ubuntu-latest | |
outputs: | |
newRelease: ${{ steps.nyx.outputs.newRelease }} | |
steps: | |
- name: Checkout sources | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Setup Java | |
uses: actions/setup-java@v4 | |
with: | |
distribution: temurin | |
java-version-file: .java-version | |
- name: Setup Gradle | |
uses: gradle/gradle-build-action@v2 | |
with: | |
gradle-version: wrapper | |
- name: Cache build files | |
uses: actions/cache@v3 | |
with: | |
path: '**/build/' | |
key: pipeline-${{ github.run_id }}-gradle-build-cache | |
- name: Init with Gradle | |
run: ./gradlew nyxInfer --stacktrace | |
- name: Load Nyx data | |
id: nyx | |
uses: mooltiverse/nyx-github-action@main | |
with: | |
command: infer | |
resume: true | |
- name: Archive Nyx state file | |
uses: actions/upload-artifact@v3 | |
if: ${{ always() }} | |
with: | |
name: .nyx-state.json | |
path: build/.nyx-state.json | |
build: | |
name: Build & Unit tests | |
needs: init | |
runs-on: ubuntu-latest | |
env: | |
NYX_RESUME: true | |
steps: | |
- name: Checkout sources | |
uses: actions/checkout@v4 | |
- name: Setup Java | |
uses: actions/setup-java@v4 | |
with: | |
distribution: temurin | |
java-version-file: .java-version | |
- name: Setup Gradle | |
uses: gradle/gradle-build-action@v2 | |
with: | |
gradle-version: wrapper | |
- name: Cache build files | |
uses: actions/cache@v3 | |
with: | |
path: '**/build/' | |
key: pipeline-${{ github.run_id }}-gradle-build-cache | |
fail-on-cache-miss: true | |
- name: Build | |
run: gradle -s :build | |
- name: Archive Jar | |
uses: actions/upload-artifact@v4 | |
with: | |
name: jar | |
path: '**/build/libs/' | |
- name: Publish Test Report | |
uses: mikepenz/action-junit-report@v4 | |
if: success() || failure() | |
with: | |
report_paths: '**/build/test-results/*/TEST-*.xml' | |
check_name: "JUnit Test Report (Unit tests)" | |
fail_on_failure: true | |
test: | |
name: Integration tests | |
runs-on: ubuntu-latest | |
needs: build | |
env: | |
NYX_RESUME: true | |
strategy: | |
fail-fast: false | |
matrix: | |
gradle: [ '8.6', '8.5', '8.0.2', '7.0.2', '6.9.3', '6.8.3' ] | |
java: [ 8, 11, 17, 21 ] | |
exclude: | |
- { gradle: '8.0.2', java: 21 } | |
- { gradle: '7.0.2', java: 21 } | |
- { gradle: '7.0.2', java: 17 } | |
- { gradle: '6.9.3', java: 21 } | |
- { gradle: '6.9.3', java: 17 } | |
- { gradle: '6.8.3', java: 21 } | |
- { gradle: '6.8.3', java: 17 } | |
steps: | |
- name: Checkout sources | |
uses: actions/checkout@v4 | |
- name: Setup Java | |
uses: actions/setup-java@v4 | |
with: | |
distribution: temurin | |
java-version-file: .java-version | |
- name: Setup Gradle | |
uses: gradle/gradle-build-action@v2 | |
with: | |
gradle-version: wrapper | |
- name: Cache build files | |
uses: actions/cache@v3 | |
with: | |
path: '**/build/' | |
key: pipeline-${{ github.run_id }}-gradle-build-cache | |
fail-on-cache-miss: true | |
- name: Check | |
run: gradle -s :test :integrationTest | |
env: | |
CURSED_PUBLISH_TEST_GRADLE_VERSION: "${{ matrix.gradle }}" | |
CURSED_PUBLISH_TEST_JAVA_VERSION: "${{ matrix.java }}" | |
- name: Publish Test Report | |
uses: mikepenz/action-junit-report@v4 | |
if: success() || failure() | |
with: | |
report_paths: '**/build/test-results/*/TEST-*.xml' | |
check_name: "JUnit Test Report (Integration tests, Gradle ${{ matrix.gradle }}, Java ${{ matrix.java }})" | |
fail_on_failure: true | |
release: | |
name: Publish & Release | |
needs: [ init, build, test ] | |
if: needs.init.outputs.newRelease == 'true' | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
env: | |
NYX_RESUME: true | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
MAVEN_USER: ${{ secrets.MAVEN_USER }} | |
MAVEN_PASS: ${{ secrets.MAVEN_PASS }} | |
ORG_GRADLE_PROJECT_signingKey: ${{ secrets.GPG_SIGNING_KEY }} | |
ORG_GRADLE_PROJECT_signingKeyId: ${{ secrets.GPG_SIGNING_KEY_ID }} | |
ORG_GRADLE_PROJECT_signingPassword: ${{ secrets.GPG_SIGNING_PASSWORD }} | |
steps: | |
- name: Checkout sources | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Setup Java | |
uses: actions/setup-java@v4 | |
with: | |
distribution: temurin | |
java-version-file: .java-version | |
- name: Setup Gradle | |
uses: gradle/gradle-build-action@v2 | |
with: | |
gradle-version: wrapper | |
- name: Cache build files | |
uses: actions/cache@v3 | |
with: | |
path: '**/build/' | |
key: pipeline-${{ github.run_id }}-gradle-build-cache | |
fail-on-cache-miss: true | |
- name: Publish | |
run: ./gradlew nyxMake nyxMark nyxPublish release --stacktrace -Pgradle.publish.key=${{ secrets.GRADLE_PLUGIN_PUBLISH_KEY }} -Pgradle.publish.secret=${{ secrets.GRADLE_PLUGIN_PUBLISH_SECRET }} |