From e331513463c9150e98aa7f56468c29e3a9a2952a Mon Sep 17 00:00:00 2001 From: Andrew Kozlov Date: Fri, 20 Feb 2026 18:52:37 +0100 Subject: [PATCH 1/3] ALT-10990 plugin build publishing script --- .github/workflows/publish.yaml | 98 ++++++++++++---------------------- gradle.properties | 6 ++- 2 files changed, 40 insertions(+), 64 deletions(-) diff --git a/.github/workflows/publish.yaml b/.github/workflows/publish.yaml index d607b809b..9e54f1b43 100644 --- a/.github/workflows/publish.yaml +++ b/.github/workflows/publish.yaml @@ -1,92 +1,64 @@ -name: Publish to JetBrains Marketplace +name: Plugin deployment on: - push: + pull_request: concurrency: group: publish-plugin-${{ github.ref_name }} cancel-in-progress: true - jobs: - test: - name: Run Tests for ${{ matrix.environmentName }} + deploy: + name: Deploy the plugin for ${{ matrix.environmentName }} runs-on: arc-runners-large timeout-minutes: 60 strategy: matrix: environmentName: - - 251 - 252 + - 253 fail-fast: false steps: - - uses: actions/checkout@v4 + - name: Checkout code + uses: actions/checkout@v4 with: fetch-depth: 1 - - uses: actions/setup-java@v4 + - name: Setup Coretto JDK + uses: actions/setup-java@v4 with: java-version-file: '.java-version' distribution: 'corretto' cache: 'gradle' - - name: Run Tests - env: - GRADLE_OPTS: "-Xmx2g -XX:MaxMetaspaceSize=512m -Dkotlin.daemon.jvm.options=-Xmx1g" - run: | - echo "environmentName=${{ matrix.environmentName }}" - ./gradlew test \ - --parallel -Dorg.gradle.workers.max=2 -Dorg.gradle.test.worker.max=2 \ - --no-daemon -PenvironmentName=${{ matrix.environmentName }} + - name: Setup Gradle + uses: gradle/actions/setup-gradle@v3 - verify: - name: Verify Plugin for ${{ matrix.environmentName }} - runs-on: arc-runners-large - timeout-minutes: 60 - strategy: - matrix: - environmentName: - - 251 - - 252 - fail-fast: false - steps: - - uses: actions/checkout@v4 - with: - fetch-depth: 1 + - name: Generate timestamp + run: echo "VERSION=$(date +'%Y.%m.%d-%H%M')" >> $GITHUB_ENV + + - name: Build plugin + run: ./gradlew buildPlugin -PenvironmentName=${{ matrix.environmentName }} -PpluginVersion=${{ env.VERSION }} - - uses: actions/setup-java@v4 + - name: Upload plugin to PR + uses: actions/upload-artifact@v4 with: - java-version-file: '.java-version' - distribution: 'corretto' - cache: 'gradle' + name: HyperskillAcademy-${{ env.VERSION }}-${{ matrix.environmentName }} + path: intellij-plugin/build/distributions + retention-days: 3 - - name: Verify Plugin - env: - GRADLE_OPTS: "-Xmx2g -XX:MaxMetaspaceSize=512m -Dkotlin.daemon.jvm.options=-Xmx1g" - run: | - echo "environmentName=${{ matrix.environmentName }}" - ./gradlew verifyPlugin \ - --parallel -Dorg.gradle.workers.max=2 -Dorg.gradle.test.worker.max=2 \ - --no-daemon -PenvironmentName=${{ matrix.environmentName }} + - name: Run tests + continue-on-error: true + run: ./gradlew test -PenvironmentName=${{ matrix.environmentName }} -PpluginVersion=${{ env.VERSION }} -# publish: -# name: Publish Plugin -# if: github.ref == 'refs/heads/main' && github.event_name == 'push' -# runs-on: arc-runners-large -# needs: -# - test -# - verify -# timeout-minutes: 30 -# steps: -# - uses: actions/checkout@v4 -# -# - uses: actions/setup-java@v4 -# with: -# java-version-file: '.java-version' -# distribution: 'corretto' -# -# - name: Publish Plugin -# run: | -# ./gradlew publishPlugin --no-daemon -# env: -# JB_MARKETPLACE_TOKEN: ${{ secrets.JB_MARKETPLACE_TOKEN }} + - name: Verify plugin + run: ./gradlew verifyPlugin -PenvironmentName=${{ matrix.environmentName }} -PpluginVersion=${{ env.VERSION }} + + - name: Upload plugin to Marketplace + if: github.ref == 'refs/heads/main' && + github.event_name == 'push' && + steps.run-tests.outcome == 'success' + continue-on-error: true + run: ./gradlew publishPlugin -PenvironmentName=${{ matrix.environmentName }} -PpluginVersion=${{ env.VERSION }} + env: + JB_MARKETPLACE_TOKEN: ${{ secrets.JB_MARKETPLACE_TOKEN }} \ No newline at end of file diff --git a/gradle.properties b/gradle.properties index bf616d456..ed8690cff 100644 --- a/gradle.properties +++ b/gradle.properties @@ -28,7 +28,8 @@ enableBuildSearchableOptions=false # Note, remove `-` before build number (`b` letter) to make it work #jbrVersion=17.0.11b1207.24 -org.gradle.jvmargs=-Xmx2g +org.gradle.jvmargs=-Xmx2g -XX:MaxMetaspaceSize=512m +kotlin.daemon.jvm.options=-Xmx1g # Since kotlin 1.4, stdlib dependency is added by default by kotlin gradle plugin. # But we don't need it because all necessary kotlin libraries are already bundled into IDE. @@ -46,3 +47,6 @@ publishingVersion= # Build speed optimizations kotlin.incremental=true org.gradle.parallel=true +org.gradle.daemon=false +org.gradle.workers.max=2 +org.gradle.test.worker.max=2 \ No newline at end of file From 2d5dd83d57337d579416aa6f36da55d8ea55680a Mon Sep 17 00:00:00 2001 From: Andrew Kozlov Date: Tue, 24 Feb 2026 13:20:56 +0100 Subject: [PATCH 2/3] fixup! ALT-10990 plugin build publishing script --- .github/workflows/publish.yaml | 19 ++++++++----------- gradle.properties | 2 +- 2 files changed, 9 insertions(+), 12 deletions(-) diff --git a/.github/workflows/publish.yaml b/.github/workflows/publish.yaml index 9e54f1b43..4615ac3fc 100644 --- a/.github/workflows/publish.yaml +++ b/.github/workflows/publish.yaml @@ -24,7 +24,7 @@ jobs: with: fetch-depth: 1 - - name: Setup Coretto JDK + - name: Setup Corretto JDK uses: actions/setup-java@v4 with: java-version-file: '.java-version' @@ -48,17 +48,14 @@ jobs: retention-days: 3 - name: Run tests - continue-on-error: true run: ./gradlew test -PenvironmentName=${{ matrix.environmentName }} -PpluginVersion=${{ env.VERSION }} - name: Verify plugin run: ./gradlew verifyPlugin -PenvironmentName=${{ matrix.environmentName }} -PpluginVersion=${{ env.VERSION }} - - - name: Upload plugin to Marketplace - if: github.ref == 'refs/heads/main' && - github.event_name == 'push' && - steps.run-tests.outcome == 'success' - continue-on-error: true - run: ./gradlew publishPlugin -PenvironmentName=${{ matrix.environmentName }} -PpluginVersion=${{ env.VERSION }} - env: - JB_MARKETPLACE_TOKEN: ${{ secrets.JB_MARKETPLACE_TOKEN }} \ No newline at end of file +# +# - name: Upload plugin to Marketplace +# if: github.ref == 'refs/heads/main' && +# github.event_name == 'push' && +# run: ./gradlew publishPlugin -PenvironmentName=${{ matrix.environmentName }} -PpluginVersion=${{ env.VERSION }} +# env: +# JB_MARKETPLACE_TOKEN: ${{ secrets.JB_MARKETPLACE_TOKEN }} diff --git a/gradle.properties b/gradle.properties index ed8690cff..25be69050 100644 --- a/gradle.properties +++ b/gradle.properties @@ -49,4 +49,4 @@ kotlin.incremental=true org.gradle.parallel=true org.gradle.daemon=false org.gradle.workers.max=2 -org.gradle.test.worker.max=2 \ No newline at end of file +org.gradle.test.worker.max=2 From 1ed1db731932a446d5b459984e220c82c65856a3 Mon Sep 17 00:00:00 2001 From: Andrew Kozlov Date: Tue, 24 Feb 2026 14:11:38 +0100 Subject: [PATCH 3/3] fixup! ALT-10990 plugin build publishing script --- gradle.properties | 3 --- 1 file changed, 3 deletions(-) diff --git a/gradle.properties b/gradle.properties index 25be69050..458991097 100644 --- a/gradle.properties +++ b/gradle.properties @@ -47,6 +47,3 @@ publishingVersion= # Build speed optimizations kotlin.incremental=true org.gradle.parallel=true -org.gradle.daemon=false -org.gradle.workers.max=2 -org.gradle.test.worker.max=2