@@ -27,7 +27,7 @@ concurrency:
2727
2828jobs :
2929
30- # Prepare environment and build the plugin
30+ # Prepare the environment and build the plugin
3131 build :
3232 name : Build
3333 runs-on : ubuntu-latest
@@ -37,52 +37,27 @@ jobs:
3737 pluginVerifierHomeDir : ${{ steps.properties.outputs.pluginVerifierHomeDir }}
3838 steps :
3939
40+ # Free GitHub Actions Environment Disk Space
41+ - name : Maximize Build Space
42+ 43+ with :
44+ tool-cache : false
45+ large-packages : false
46+
4047 # Check out the current repository
4148 - name : Fetch Sources
42- uses : actions/checkout@v4
49+ uses : actions/checkout@v5
4350
44- - name : Free disk space
45- shell : bash
46- run : |
47- echo "Disk BEFORE cleanup"; df -h
48- sudo rm -rf /usr/local/lib/android || true
49- sudo rm -rf /usr/share/dotnet || true
50- sudo rm -rf /opt/ghc || true
51- sudo rm -rf /usr/local/share/boost || true
52- sudo rm -rf "$AGENT_TOOLSDIRECTORY" || true # tool-cache
53- sudo apt-get clean
54- echo "Disk AFTER cleanup"; df -h
55-
56- # Validate wrapper
57- - name : Gradle Wrapper Validation
58- uses : gradle/actions/wrapper-validation@v3
59-
60- # Set up Java environment for the next steps
51+ # Set up the Java environment for the next steps
6152 - name : Setup Java
62- uses : actions/setup-java@v4
53+ uses : actions/setup-java@v5
6354 with :
6455 distribution : zulu
65- java-version : 17
56+ java-version : 21
6657
6758 # Setup Gradle
6859 - name : Setup Gradle
69- uses : gradle/actions/setup-gradle@v4
70-
71- # Set environment variables
72- - name : Export Properties
73- id : properties
74- shell : bash
75- run : |
76- PROPERTIES="$(./gradlew properties --console=plain -q)"
77- VERSION="$(echo "$PROPERTIES" | grep "^version:" | cut -f2- -d ' ')"
78- CHANGELOG="$(./gradlew getChangelog --unreleased --no-header --console=plain -q)"
79-
80- echo "version=$VERSION" >> $GITHUB_OUTPUT
81- echo "pluginVerifierHomeDir=~/.pluginVerifier" >> $GITHUB_OUTPUT
82-
83- echo "changelog<<EOF" >> $GITHUB_OUTPUT
84- echo "$CHANGELOG" >> $GITHUB_OUTPUT
85- echo "EOF" >> $GITHUB_OUTPUT
60+ uses : gradle/actions/setup-gradle@v5
8661
8762 # Build plugin
8863 - name : Build plugin
9974
10075 echo "filename=${FILENAME:0:-4}" >> $GITHUB_OUTPUT
10176
102- # Store already-built plugin as an artifact for downloading
77+ # Store an already-built plugin as an artifact for downloading
10378 - name : Upload artifact
104- uses : actions/upload-artifact@v4
79+ uses : actions/upload-artifact@v5
10580 with :
10681 name : ${{ steps.artifact.outputs.filename }}
10782 path : ./build/distributions/content/*/*
@@ -113,20 +88,29 @@ jobs:
11388 runs-on : ubuntu-latest
11489 steps :
11590
91+ # Free GitHub Actions Environment Disk Space
92+ - name : Maximize Build Space
93+ 94+ with :
95+ tool-cache : false
96+ large-packages : false
97+
11698 # Check out the current repository
11799 - name : Fetch Sources
118- uses : actions/checkout@v4
100+ uses : actions/checkout@v5
119101
120- # Set up Java environment for the next steps
102+ # Set up the Java environment for the next steps
121103 - name : Setup Java
122- uses : actions/setup-java@v4
104+ uses : actions/setup-java@v5
123105 with :
124106 distribution : zulu
125- java-version : 17
107+ java-version : 21
126108
127109 # Setup Gradle
128110 - name : Setup Gradle
129- uses : gradle/actions/setup-gradle@v4
111+ uses : gradle/actions/setup-gradle@v5
112+ with :
113+ cache-read-only : true
130114
131115 # Run tests
132116 - name : Run Tests
@@ -135,18 +119,18 @@ jobs:
135119 # Collect Tests Result of failed tests
136120 - name : Collect Tests Result
137121 if : ${{ failure() }}
138- uses : actions/upload-artifact@v4
122+ uses : actions/upload-artifact@v5
139123 with :
140124 name : tests-result
141125 path : ${{ github.workspace }}/build/reports/tests
142126
143127 # Upload the Kover report to CodeCov
144128 - name : Upload Code Coverage Report
145- uses : codecov/codecov-action@v4
129+ uses : codecov/codecov-action@v5
146130 with :
147131 files : ${{ github.workspace }}/build/reports/kover/report.xml
148132
149- # Run Qodana inspections and provide report
133+ # Run Qodana inspections and provide a report
150134 inspectCode :
151135 name : Inspect code
152136 needs : [ build ]
@@ -159,28 +143,28 @@ jobs:
159143
160144 # Free GitHub Actions Environment Disk Space
161145 - name : Maximize Build Space
162- uses : jlumbroso/free-disk-space@main
146+ uses : jlumbroso/free-disk-space@v1.3.1
163147 with :
164148 tool-cache : false
165149 large-packages : false
166150
167151 # Check out the current repository
168152 - name : Fetch Sources
169- uses : actions/checkout@v4
153+ uses : actions/checkout@v5
170154 with :
171155 ref : ${{ github.event.pull_request.head.sha }} # to check out the actual pull request commit, not the merge commit
172156 fetch-depth : 0 # a full history is required for pull request analysis
173157
174- # Set up Java environment for the next steps
158+ # Set up the Java environment for the next steps
175159 - name : Setup Java
176- uses : actions/setup-java@v4
160+ uses : actions/setup-java@v5
177161 with :
178162 distribution : zulu
179- java-version : 17
163+ java-version : 21
180164
181165 # Run Qodana inspections
182166 - name : Qodana - Code Inspection
183- uses : JetBrains/qodana-action@v2024 .2
167+ uses : JetBrains/qodana-action@v2025.2 .2
184168 with :
185169 cache-default-branch-only : true
186170
@@ -193,47 +177,43 @@ jobs:
193177
194178 # Free GitHub Actions Environment Disk Space
195179 - name : Maximize Build Space
196- uses : jlumbroso/free-disk-space@main
180+ uses : jlumbroso/free-disk-space@v1.3.1
197181 with :
198182 tool-cache : false
199183 large-packages : false
200184
185+
201186 # Check out the current repository
202187 - name : Fetch Sources
203- uses : actions/checkout@v4
188+ uses : actions/checkout@v5
204189
205- # Set up Java environment for the next steps
190+ # Set up the Java environment for the next steps
206191 - name : Setup Java
207- uses : actions/setup-java@v4
192+ uses : actions/setup-java@v5
208193 with :
209194 distribution : zulu
210- java-version : 17
195+ java-version : 21
211196
212197 # Setup Gradle
213198 - name : Setup Gradle
214- uses : gradle/actions/setup-gradle@v4
215-
216- # Cache Plugin Verifier IDEs
217- - name : Setup Plugin Verifier IDEs Cache
218- uses : actions/cache@v4
199+ uses : gradle/actions/setup-gradle@v5
219200 with :
220- path : ${{ needs.build.outputs.pluginVerifierHomeDir }}/ides
221- key : plugin-verifier-${{ hashFiles('build/listProductsReleases.txt') }}
201+ cache-read-only : true
222202
223203 # Run Verify Plugin task and IntelliJ Plugin Verifier tool
224204 - name : Run Plugin Verification tasks
225- run : ./gradlew verifyPlugin -Dplugin.verifier.home.dir=${{ needs.build.outputs.pluginVerifierHomeDir }}
205+ run : ./gradlew verifyPlugin
226206
227207 # Collect Plugin Verifier Result
228208 - name : Collect Plugin Verifier Result
229209 if : ${{ always() }}
230- uses : actions/upload-artifact@v4
210+ uses : actions/upload-artifact@v5
231211 with :
232212 name : pluginVerifier-result
233213 path : ${{ github.workspace }}/build/reports/pluginVerifier
234214
235215 # Prepare a draft release for GitHub Releases page for the manual verification
236- # If accepted and published, release workflow would be triggered
216+ # If accepted and published, the release workflow would be triggered
237217 releaseDraft :
238218 name : Release draft
239219 if : github.event_name != 'pull_request'
@@ -245,12 +225,12 @@ jobs:
245225
246226 # Check out the current repository
247227 - name : Fetch Sources
248- uses : actions/checkout@v4
228+ uses : actions/checkout@v5
249229
250230 # Remove old release drafts by using the curl request for the available releases with a draft flag
251231 - name : Remove Old Release Drafts
252232 env :
253- GITHUB_TOKEN : ${{ github.token }}
233+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
254234 run : |
255235 gh api repos/{owner}/{repo}/releases \
256236 --jq '.[] | select(.draft == true) | .id' \
@@ -259,12 +239,13 @@ jobs:
259239 # Create a new release draft which is not publicly visible and requires manual acceptance
260240 - name : Create Release Draft
261241 env :
262- GITHUB_TOKEN : ${{ github.token }}
242+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
263243 run : |
264- gh release create "v${{ needs.build.outputs.version }}" \
244+ VERSION=$(./gradlew properties --property version --quiet --console=plain | tail -n 1 | cut -f2- -d ' ')
245+ RELEASE_NOTE="./build/tmp/release_note.txt"
246+ ./gradlew getChangelog --unreleased --no-header --quiet --console=plain --output-file=$RELEASE_NOTE
247+
248+ gh release create $VERSION \
265249 --draft \
266- --title "v${{ needs.build.outputs.version }}" \
267- --notes "$(cat << 'EOM'
268- ${{ needs.build.outputs.changelog }}
269- EOM
270- )"
250+ --title $VERSION \
251+ --notes-file $RELEASE_NOTE
0 commit comments