@@ -58,40 +58,38 @@ jobs:
5858 run : ./gradlew --no-daemon --version
5959 working-directory : ide-plugins
6060
61- - name : Full build with stacktrace (capture to file)
61+ - name : Build plugin
6262 env :
6363 GRADLE_OPTS : " -Dorg.gradle.jvmargs=-Xmx3g"
6464 run : |
6565 set -o pipefail
66- ./gradlew build --no-daemon --stacktrace 2>&1 | tee ../gradle-build.log || true
66+ ./gradlew buildPlugin --no-daemon --stacktrace 2>&1 | tee ../gradle-build.log
6767 working-directory : ide-plugins
68+
6869 - name : Upload build log
6970 uses : actions/upload-artifact@v4
7071 with :
7172 name : gradle-build-log-java-17
7273 path : gradle-build.log
74+ if : always()
7375
74- - name : Build Kotlin plugin subproject if present
76+ - name : Prepare plugin artifact for upload
7577 run : |
76- set -o pipefail
77- if ./gradlew :kotlin:tasks --dry-run &>/dev/null; then
78- echo "Detected :kotlin subproject -> building it"
79- ./gradlew :kotlin:build --no-daemon --stacktrace 2>&1 | tee ../kotlin-subproject-build.log || true
80- echo "Uploading kotlin-subproject-build.log"
81- ls -la ../kotlin-subproject-build.log || true
82- elif ./gradlew :plugin:kotlin:tasks --dry-run &>/dev/null; then
83- echo "Detected :plugin:kotlin subproject -> building it"
84- ./gradlew :plugin:kotlin:build --no-daemon --stacktrace 2>&1 | tee ../kotlin-subproject-build.log || true
85- else
86- echo "No explicit kotlin plugin subproject found; running assemble on all projects"
87- ./gradlew assemble --no-daemon --stacktrace 2>&1 | tee ../assemble.log || true
78+ cd ide-plugins/build/distributions
79+ PLUGIN_FILE=$(ls *.zip | head -n 1)
80+ if [ -n "$PLUGIN_FILE" ]; then
81+ # Create a temporary directory for extraction
82+ mkdir -p plugin-extracted
83+ # Extract the plugin zip
84+ unzip -q "$PLUGIN_FILE" -d plugin-extracted/
85+ # Remove the original zip
86+ rm "$PLUGIN_FILE"
8887 fi
89- working-directory : ide-plugins
90- - name : Upload kotlin-subproject/build logs if present
88+ if : success()
89+
90+ - name : Upload plugin artifact
9191 uses : actions/upload-artifact@v4
9292 with :
93- name : kotlin-subproject-logs-java-17
94- path : |
95- kotlin-subproject-build.log
96- assemble.log
97- if : always()
93+ name : intellij-plugin-pr-${{ github.event.pull_request.number || github.run_number }}
94+ path : ide-plugins/build/distributions/plugin-extracted/
95+ if : success()
0 commit comments