Skip to content

Commit

Permalink
Update Gradle action in build workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
OptimumCode committed Aug 21, 2024
1 parent d13566c commit 4b5bc09
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 14 deletions.
15 changes: 10 additions & 5 deletions .github/workflows/build.main.kts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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",
)
}
}
}
27 changes: 18 additions & 9 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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:
Expand All @@ -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'

0 comments on commit 4b5bc09

Please sign in to comment.