From 3bf2a511bd1eeaa4d4e1b0b1e6cb3748dd455138 Mon Sep 17 00:00:00 2001 From: You Qi Date: Fri, 28 Apr 2023 04:44:43 +0800 Subject: [PATCH] Setup github actions --- .github/workflows/pre-merge.yaml | 14 +++++--------- .github/workflows/publish-plugin.yaml | 5 +++++ 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/.github/workflows/pre-merge.yaml b/.github/workflows/pre-merge.yaml index bbafc83..12f880f 100644 --- a/.github/workflows/pre-merge.yaml +++ b/.github/workflows/pre-merge.yaml @@ -21,16 +21,12 @@ jobs: steps: - name: Checkout Repo uses: actions/checkout@v3 + - name: Set up our JDK environment + uses: actions/setup-java@v3.10.0 + with: + distribution: 'corretto' + java-version: 11 - name: Cache Gradle Caches uses: gradle/gradle-build-action@v2 - name: Run Gradle tasks run: ./gradlew preMerge --continue - - # We do a run of the new task `templateExample` created by the plugin - - name: Run the plugin - run: ./gradlew templateExample --message="Test Run" --tag=CI - if: success() - # And we verify that the output of the file is correct. - - name: Verify the plugin output - run: grep -Fxq "[CI] Test Run" ./example/build/template-example.txt - if: success() diff --git a/.github/workflows/publish-plugin.yaml b/.github/workflows/publish-plugin.yaml index 83e48b1..6428331 100644 --- a/.github/workflows/publish-plugin.yaml +++ b/.github/workflows/publish-plugin.yaml @@ -15,6 +15,11 @@ jobs: steps: - name: Checkout Repo uses: actions/checkout@v3 + - name: Set up our JDK environment + uses: actions/setup-java@v3.10.0 + with: + distribution: 'corretto' + java-version: 11 - name: Cache Gradle Caches uses: gradle/gradle-build-action@v2 - name: Run Gradle tasks