From 78b2a510b80ee7165ad6e235bd3f367f8b893ef6 Mon Sep 17 00:00:00 2001 From: jaguililla Date: Thu, 12 Jan 2023 19:38:11 +0100 Subject: [PATCH] Improve CI --- .github/actions/gradle/action.yml | 44 ------------------------------- .github/workflows/release.yml | 15 ++++++++--- 2 files changed, 12 insertions(+), 47 deletions(-) delete mode 100644 .github/actions/gradle/action.yml diff --git a/.github/actions/gradle/action.yml b/.github/actions/gradle/action.yml deleted file mode 100644 index 4bdbd49..0000000 --- a/.github/actions/gradle/action.yml +++ /dev/null @@ -1,44 +0,0 @@ - -# -# This action *WILL REQUIRE* to do the checkout before (as it is used from the same repository). -# -name: Gradle -description: Run a Gradle build executing the supplied tasks. - -inputs: - java: - description: Java version used to run Gradle. - required: true - default: "17" - - java_distribution: - description: Java distribution used to run Gradle. - required: true - default: temurin - - tasks: - description: Gradle tasks to execute. - required: true - default: build - - check_directory: - description: Directory to check for build execution. - default: build - -runs: - using: composite - steps: - - uses: actions/setup-java@v3 - with: - java-version: ${{ inputs.java }} - distribution: ${{ inputs.java_distribution }} - cache: gradle - - run: ./gradlew ${{ inputs.tasks }} - shell: bash - - if: failure() - run: ./gradlew --info --stacktrace ${{ inputs.tasks }} - shell: bash - - name: Check Build - shell: bash - if: ${{ inputs.check_directory != '' }} - run: ls -AlF "${{ inputs.check_directory }}" diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index b45617d..2fb02f1 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -17,7 +17,16 @@ jobs: URL="https://$GITHUB_ACTOR:${{ secrets.GITHUB_TOKEN }}@github.com/$GITHUB_REPOSITORY.git" git remote set-url origin "$URL" git config --global user.name "$GITHUB_ACTOR" - - name: Release Version - uses: ./.github/actions/gradle + - name: Set Up Java + uses: actions/setup-java@v3 with: - tasks: release + java-version: "17" + distribution: temurin + cache: gradle + - name: Release Version + run: ./gradlew release + shell: bash + - name: Release Version + if: failure() + run: ./gradlew --info --stacktrace release + shell: bash