Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cleanup actions #4

Merged
merged 1 commit into from
Mar 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions .github/actions/setup-gradle-build/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Setup Gradle
description: Sets up the environment to run Gradle

runs:
using: composite

steps:
- name: Write Gradle build properties to `~/.gradle/gradle.properties`
run: |
mkdir -p ~/.gradle
printf "org.gradle.jvmargs=-Xmx3G -XX:+UseParallelGC\n" >> ~/.gradle/gradle.properties
printf "org.gradle.vfs.watch=false\n" >> ~/.gradle/gradle.properties
shell: bash

- uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: 21

- uses: gradle/wrapper-validation-action@v2

- uses: gradle/actions/setup-gradle@v3
with:
gradle-home-cache-cleanup: true # https://github.com/gradle/gradle-build-action/issues/630
14 changes: 1 addition & 13 deletions .github/workflows/default.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,21 +23,9 @@ jobs:
with:
fetch-depth: 0

- name: Write Gradle build properties to `~/.gradle/gradle.properties`
run: |
mkdir -p ~/.gradle
printf "org.gradle.jvmargs=-Xmx3G -XX:+UseParallelGC\n" >> ~/.gradle/gradle.properties
printf "org.gradle.vfs.watch=false\n" >> ~/.gradle/gradle.properties
shell: bash

- uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: 21

- uses: gradle/wrapper-validation-action@v2

- uses: gradle/actions/setup-gradle@v3
- uses: ./.github/actions/setup-gradle-build

- run: ./gradlew assemble

Expand Down
15 changes: 1 addition & 14 deletions .github/workflows/publish_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,20 +23,7 @@ jobs:
with:
fetch-depth: 0

- name: Write Gradle build properties to `~/.gradle/gradle.properties`
run: |
mkdir -p ~/.gradle
printf "org.gradle.jvmargs=-Xmx3G -XX:+UseParallelGC\n" >> ~/.gradle/gradle.properties
printf "org.gradle.vfs.watch=false\n" >> ~/.gradle/gradle.properties
printf "org.gradle.parallel=false\n" >> ~/.gradle/gradle.properties
shell: bash

- uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: 21

- uses: gradle/actions/setup-gradle@v3
- uses: ./.github/actions/setup-gradle-build

- name: Unwrap GPG key
env:
Expand Down
30 changes: 2 additions & 28 deletions .github/workflows/publish_snapshots.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,21 +25,7 @@ jobs:
with:
fetch-depth: 0

- name: Write Gradle build properties to `~/.gradle/gradle.properties`
run: |
mkdir -p ~/.gradle
printf "org.gradle.jvmargs=-Xmx3G -XX:+UseParallelGC\n" >> ~/.gradle/gradle.properties
printf "org.gradle.vfs.watch=false\n" >> ~/.gradle/gradle.properties
printf "org.gradle.parallel=false\n" >> ~/.gradle/gradle.properties
shell: bash

- uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: 21

- name: Build app with Gradle
uses: gradle/actions/setup-gradle@v3
- uses: ./.github/actions/setup-gradle-build

- run: ./gradlew assemble

Expand All @@ -59,19 +45,7 @@ jobs:
with:
fetch-depth: 0

- name: Write Gradle build properties to `~/.gradle/gradle.properties`
run: |
mkdir -p ~/.gradle
printf "org.gradle.jvmargs=-Xmx3G -XX:+UseParallelGC\n" >> ~/.gradle/gradle.properties
printf "org.gradle.vfs.watch=false\n" >> ~/.gradle/gradle.properties
shell: bash

- uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: 21

- uses: gradle/actions/setup-gradle@v3
- uses: ./.github/actions/setup-gradle-build

- run: ./gradlew assemble -PskipJarVersion

Expand Down