From 4b5bc09b5419db8b8381a1a190cb3220de431e4f Mon Sep 17 00:00:00 2001 From: Oleg Smirnov Date: Wed, 21 Aug 2024 10:25:06 +0400 Subject: [PATCH] Update Gradle action in build workflow --- .github/workflows/build.main.kts | 15 ++++++++++----- .github/workflows/build.yaml | 27 ++++++++++++++++++--------- 2 files changed, 28 insertions(+), 14 deletions(-) diff --git a/.github/workflows/build.main.kts b/.github/workflows/build.main.kts index b5379f5d1..5e0a696c3 100755 --- a/.github/workflows/build.main.kts +++ b/.github/workflows/build.main.kts @@ -6,12 +6,13 @@ @file:DependsOn("actions:checkout:v4") @file:DependsOn("actions:cache:v4") @file:DependsOn("actions:setup-java:v4") -@file:DependsOn("gradle:gradle-build-action:v3") +@file:DependsOn("gradle:actions__setup-gradle:v4") + import io.github.typesafegithub.workflows.actions.actions.Cache import io.github.typesafegithub.workflows.actions.actions.Checkout import io.github.typesafegithub.workflows.actions.actions.SetupJava -import io.github.typesafegithub.workflows.actions.gradle.GradleBuildAction +import io.github.typesafegithub.workflows.actions.gradle.ActionsSetupGradle import io.github.typesafegithub.workflows.domain.Concurrency import io.github.typesafegithub.workflows.domain.RunnerType.* import io.github.typesafegithub.workflows.domain.triggers.PullRequest @@ -59,11 +60,15 @@ workflow( ), ) uses( - name = "Build", - action = GradleBuildAction( - arguments = "build", + name = "Set up Gradle", + action = ActionsSetupGradle( + gradleVersion = "wrapper", ), ) + run( + name = "Build", + command = "./gradlew build --stacktrace", + ) } } } diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 016689227..f1e8871b6 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -46,10 +46,13 @@ jobs: path: '~/.konan/**/*' key: 'kotlin-konan-${{ runner.os }}' - id: 'step-3' - name: 'Build' - uses: 'gradle/gradle-build-action@v3' + name: 'Set up Gradle' + uses: 'gradle/actions/setup-gradle@v4' with: - arguments: 'build' + gradle-version: 'wrapper' + - id: 'step-4' + name: 'Build' + run: './gradlew build --stacktrace' build-on-MacOSLatest: runs-on: 'macos-latest' needs: @@ -71,10 +74,13 @@ jobs: path: '~/.konan/**/*' key: 'kotlin-konan-${{ runner.os }}' - id: 'step-3' - name: 'Build' - uses: 'gradle/gradle-build-action@v3' + name: 'Set up Gradle' + uses: 'gradle/actions/setup-gradle@v4' with: - arguments: 'build' + gradle-version: 'wrapper' + - id: 'step-4' + name: 'Build' + run: './gradlew build --stacktrace' build-on-WindowsLatest: runs-on: 'windows-latest' needs: @@ -96,7 +102,10 @@ jobs: path: '~/.konan/**/*' key: 'kotlin-konan-${{ runner.os }}' - id: 'step-3' - name: 'Build' - uses: 'gradle/gradle-build-action@v3' + name: 'Set up Gradle' + uses: 'gradle/actions/setup-gradle@v4' with: - arguments: 'build' + gradle-version: 'wrapper' + - id: 'step-4' + name: 'Build' + run: './gradlew build --stacktrace'