Skip to content
Closed
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
98 changes: 35 additions & 63 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
@@ -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 }}
4 changes: 4 additions & 0 deletions .idea/vcs.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 0 additions & 3 deletions gradle-252.properties
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,3 @@ ideaVersion=IU-2025.2.4
clionVersion=CL-2025.2.4
pycharmVersion=PC-2025.2.4
riderVersion=RD-2025.2.4
# for running idea, pycharm, webstorm or android studio with plugins locally
# Path to pre-built plugin ZIP for runIde tasks (optional, overrides building from source)
localPluginPath=/Users/alexanderpetrov/Downloads/JetBrainsAcademy-2025.11-2025.2-994.zip
3 changes: 0 additions & 3 deletions gradle-253.properties
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,3 @@ ideaVersion=IU-2025.3
clionVersion=CL-2025.3
pycharmVersion=PC-2025.3
riderVersion=RD-2025.3
# for running idea, pycharm, webstorm or android studio with plugins locally
# Path to pre-built plugin ZIP for runIde tasks (optional, overrides building from source)
localPluginPath=/Users/alexanderpetrov/Downloads/JetBrainsAcademy-2025.11-2025.3-329.zip
6 changes: 5 additions & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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
Loading