From 2b416de6cf3d833e32141cd4f3ec961247ff18be Mon Sep 17 00:00:00 2001 From: Stefano Kowalke Date: Sun, 12 Jun 2022 11:25:38 +0200 Subject: [PATCH 1/2] Update action/setup-java to 3.3.0 --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index c43438c3..068befec 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -43,7 +43,7 @@ jobs: # Setup Java 11 environment for the next steps - name: Setup Java - uses: actions/setup-java@v2 + uses: actions/setup-java@v3.3.0 with: distribution: zulu java-version: 11 From dff2bd3e8ad2a23e9b352a7af4b7b21b4a6b8ef4 Mon Sep 17 00:00:00 2001 From: Stefano Kowalke Date: Sun, 12 Jun 2022 11:26:29 +0200 Subject: [PATCH 2/2] Rework and update Github actions --- .github/workflows/build.yml | 57 ++++++++++++++++++++++++++----------- 1 file changed, 41 insertions(+), 16 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 068befec..c565a912 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -21,33 +21,58 @@ on: pull_request: jobs: - # Run Gradle Wrapper Validation Action to verify the wrapper's checksum + gradleValidation: + name: Gradle Wrapper + runs-on: ubuntu-latest + steps: + # Checkout the current repository + - name: Fetch Sources + uses: actions/checkout@v3 + + # Validate wrapper + - name: Gradle Wrapper Validation + uses: gradle/wrapper-validation-action@v1.0.4 + # Run verifyPlugin, IntelliJ Plugin Verifier, and test Gradle tasks # Build plugin and provide the artifact for the next workflow jobs build: name: Build + needs: gradleValidation runs-on: ubuntu-latest outputs: + name: ${{ steps.properties.outputs.name }} version: ${{ steps.properties.outputs.version }} changelog: ${{ steps.properties.outputs.changelog }} - steps: - - # Check out current repository - - name: Fetch Sources - uses: actions/checkout@v2.4.0 - - # Validate wrapper - - name: Gradle Wrapper Validation - uses: gradle/wrapper-validation-action@v1.0.4 + steps: # Setup Java 11 environment for the next steps - name: Setup Java uses: actions/setup-java@v3.3.0 with: distribution: zulu java-version: 11 - cache: gradle + + # Check out current repository + - name: Fetch Sources + uses: actions/checkout@v3 + + # Cache Gradle Dependencies + - name: Setup Gradle Dependencies Cache + uses: actions/cache@v3 + with: + path: ~/.gradle/caches + key: ${{ runner.os }}-gradle-caches-${{ hashFiles('**/*.gradle', '**/*.gradle.kts', 'gradle.properties') }} + restore-keys: | + ${{ runner.os }}-gradle-caches-${{ hashFiles('**/*.gradle', '**/*.gradle.kts', 'gradle.properties') }} + ${{ runner.os }}-gradle-caches + + # Cache Gradle Wrapper + - name: Setup Gradle Wrapper Cache + uses: actions/cache@v3 + with: + path: ~/.gradle/wrapper + key: ${{ runner.os }}-gradle-wrapper-${{ hashFiles('**/gradle/wrapper/gradle-wrapper.properties') }} # Set environment variables - name: Export Properties @@ -83,7 +108,7 @@ jobs: # Cache Plugin Verifier IDEs - name: Setup Plugin Verifier IDEs Cache - uses: actions/cache@v2.1.7 + uses: actions/cache@v3 with: path: ${{ steps.properties.outputs.pluginVerifierHomeDir }}/ides key: plugin-verifier-${{ hashFiles('build/listProductsReleases.txt') }} @@ -95,14 +120,14 @@ jobs: # Collect Plugin Verifier Result - name: Collect Plugin Verifier Result if: ${{ always() }} - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v3 with: name: pluginVerifier-result path: ${{ github.workspace }}/build/reports/pluginVerifier # Run Qodana inspections - name: Qodana - Code Inspection - uses: JetBrains/qodana-action@v4.2.5 + uses: JetBrains/qodana-action@v5.1.0 # Prepare plugin archive content for creating artifact - name: Prepare Plugin Artifact @@ -117,7 +142,7 @@ jobs: # Store already-built plugin as an artifact for downloading - name: Upload artifact - uses: actions/upload-artifact@v2.2.4 + uses: actions/upload-artifact@v3 with: name: ${{ steps.artifact.outputs.filename }} path: ./build/distributions/content/*/* @@ -133,7 +158,7 @@ jobs: # Check out current repository - name: Fetch Sources - uses: actions/checkout@v2.4.0 + uses: actions/checkout@v3 # Remove old release drafts by using the curl request for the available releases with draft flag - name: Remove Old Release Drafts