Skip to content

Commit bef340d

Browse files
committed
Add "Set up Gradle" step to GHActions workflows
Separating the setup of the Gradle build tool from actual build invocation is more idiomatic to GH Actions in general, and provides a clearer separation of responsibilities.
1 parent 2ded8ce commit bef340d

File tree

4 files changed

+12
-12
lines changed

4 files changed

+12
-12
lines changed

.github/workflows/build-verification.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
with:
1919
java-version: '8'
2020
distribution: 'adopt'
21-
- name: Build with Gradle
21+
- name: Set up Gradle
2222
uses: gradle/gradle-build-action@v2
23-
with:
24-
arguments: build -i
23+
- name: Build with Gradle
24+
run: ./gradlew build -i

.github/workflows/development-release.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,9 @@ jobs:
2222
with:
2323
java-version: '8'
2424
distribution: 'adopt'
25-
- name: Build with Gradle
25+
- name: Set up Gradle
2626
uses: gradle/gradle-build-action@v2
27+
- name: Build with Gradle
2728
env:
2829
GITHUB_ACCESS_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
29-
with:
30-
arguments: build githubRelease -i
30+
run: ./gradlew build githubRelease -i

.github/workflows/production-release.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,9 @@ jobs:
2424
with:
2525
java-version: '8'
2626
distribution: 'adopt'
27-
- name: Build with Gradle
27+
- name: Set up Gradle
2828
uses: gradle/gradle-build-action@v2
29+
- name: Build with Gradle
2930
env:
3031
GITHUB_ACCESS_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
31-
with:
32-
arguments: build githubRelease -PfinalRelease -i
32+
run: ./gradlew build githubRelease -PfinalRelease -i

.github/workflows/wrapper-upgrade-execution.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,9 @@ jobs:
3333
with:
3434
java-version: '8'
3535
distribution: 'adopt'
36-
- name: Upgrade Wrappers
36+
- name: Set up Gradle
3737
uses: gradle/gradle-build-action@v2
38-
with:
39-
arguments: 'clean upgradeGradleWrapperAll --continue'
38+
- name: Upgrade Wrappers
39+
run: ./gradlew clean upgradeGradleWrapperAll --continue
4040
env:
4141
WRAPPER_UPGRADE_GIT_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)