Update EnricoMi/publish-unit-test-result-action action to v2.18.0 #1398
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 | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
types: [ opened, labeled, unlabeled, synchronize ] | |
env: | |
GRADLE_OPTS: "-Dorg.gradle.jvmargs=-Xmx4g -Dorg.gradle.daemon=false -Dkotlin.incremental=false" | |
JAVA_VERSION: 17 | |
jobs: | |
build: | |
name: Build | |
runs-on: ubuntu-latest | |
permissions: | |
checks: write | |
pull-requests: write | |
steps: | |
- name: Checkout Project | |
uses: actions/checkout@v4.2.1 | |
- name: Validate Gradle Wrapper | |
uses: gradle/actions/wrapper-validation@v4 | |
- name: Configure JDK ${{ env.JAVA_VERSION }} | |
uses: actions/setup-java@v4.4.0 | |
with: | |
distribution: temurin | |
java-version: ${{ env.JAVA_VERSION }} | |
- name: Setup Gradle | |
uses: gradle/actions/setup-gradle@v4 | |
with: | |
gradle-home-cache-cleanup: true | |
- run: ./gradlew --version | |
- name: Run Ktlint Check On All Sources | |
run: ./gradlew ktlintCheck -s | |
- name: Run Build and Unit Tests | |
run: ./gradlew build -s | |
- name: Publish Test Report | |
uses: EnricoMi/publish-unit-test-result-action@v2.18.0 | |
if: always() | |
with: | |
comment_mode: off | |
action_fail_on_inconclusive: true | |
files: '**/build/test-results/test/TEST-*.xml' | |
- name: Upload Artifacts | |
uses: actions/upload-artifact@v4.4.3 | |
if: github.repository == 'jaredsburrows/gradle-license-plugin' && github.ref == 'refs/heads/master' | |
with: | |
name: gradle-license-plugin-${{ github.workflow }}-${{ github.run_id }} | |
path: | | |
build/libs | |
build/outputs | |
build/publications | |
build/distributions | |
build/reports | |
build/test-results | |
publish: | |
name: Publish Snapshot | |
runs-on: ubuntu-latest | |
if: github.repository == 'jaredsburrows/gradle-license-plugin' && github.ref == 'refs/heads/master' | |
needs: | |
- build | |
steps: | |
- name: Checkout Project | |
uses: actions/checkout@v4.2.1 | |
- name: Validate Gradle Wrapper | |
uses: gradle/actions/wrapper-validation@v4 | |
- name: Configure JDK ${{ env.JAVA_VERSION }} | |
uses: actions/setup-java@v4.4.0 | |
with: | |
distribution: temurin | |
java-version: ${{ env.JAVA_VERSION }} | |
- name: Setup Gradle | |
uses: gradle/actions/setup-gradle@v4 | |
with: | |
gradle-home-cache-cleanup: true | |
- run: ./gradlew --version | |
- name: Publish | |
run: ./gradlew publish -s -i | |
env: | |
ORG_GRADLE_PROJECT_mavenCentralUsername: ${{ secrets.SONATYPE_NEXUS_USERNAME }} | |
ORG_GRADLE_PROJECT_mavenCentralPassword: ${{ secrets.SONATYPE_NEXUS_PASSWORD }} | |
ORG_GRADLE_PROJECT_signingInMemoryKey: ${{ secrets.SIGNING_PRIVATE_KEY }} | |
ORG_GRADLE_PROJECT_signingInMemoryKeyPassword: ${{ secrets.SIGNING_PASSWORD }} | |
- name: Generate Docs | |
run: ./gradlew dokkaHtml | |
- name: Publish Website | |
uses: peaceiris/actions-gh-pages@v4.0.0 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: gradle-license-plugin/build/dokka/html | |
user_name: "Github Actions" | |
user_email: "action@github.com" |