2020 # Trigger the workflow on any pull request
2121 pull_request :
2222
23+ concurrency :
24+ group : ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
25+ cancel-in-progress : true
26+
2327jobs :
2428
2529 # Prepare environment and build the plugin
@@ -32,13 +36,13 @@ jobs:
3236 pluginVerifierHomeDir : ${{ steps.properties.outputs.pluginVerifierHomeDir }}
3337 steps :
3438
35- # Check out current repository
39+ # Check out the current repository
3640 - name : Fetch Sources
3741 uses : actions/checkout@v4
3842
3943 # Validate wrapper
4044 - name : Gradle Wrapper Validation
41- uses : gradle/wrapper-validation-action @v3.5.0
45+ uses : gradle/actions/ wrapper-validation@v3
4246
4347 # Set up Java environment for the next steps
4448 - name : Setup Java
4953
5054 # Setup Gradle
5155 - name : Setup Gradle
52- uses : gradle/gradle-build-action@v3
53- with :
54- gradle-home-cache-cleanup : true
56+ uses : gradle/actions/setup-gradle@v4
5557
5658 # Set environment variables
5759 - name : Export Properties
6971 echo "$CHANGELOG" >> $GITHUB_OUTPUT
7072 echo "EOF" >> $GITHUB_OUTPUT
7173
72- ./gradlew listProductsReleases # prepare list of IDEs for Plugin Verifier
73-
7474 # Build plugin
7575 - name : Build plugin
7676 run : ./gradlew buildPlugin
@@ -100,7 +100,7 @@ jobs:
100100 runs-on : ubuntu-latest
101101 steps :
102102
103- # Check out current repository
103+ # Check out the current repository
104104 - name : Fetch Sources
105105 uses : actions/checkout@v4
106106
@@ -113,9 +113,7 @@ jobs:
113113
114114 # Setup Gradle
115115 - name : Setup Gradle
116- uses : gradle/gradle-build-action@v3
117- with :
118- gradle-home-cache-cleanup : true
116+ uses : gradle/actions/setup-gradle@v4
119117
120118 # Run tests
121119 - name : Run Tests
@@ -153,9 +151,12 @@ jobs:
153151 tool-cache : false
154152 large-packages : false
155153
156- # Check out current repository
154+ # Check out the current repository
157155 - name : Fetch Sources
158156 uses : actions/checkout@v4
157+ with :
158+ ref : ${{ github.event.pull_request.head.sha }} # to check out the actual pull request commit, not the merge commit
159+ fetch-depth : 0 # a full history is required for pull request analysis
159160
160161 # Set up Java environment for the next steps
161162 - name : Setup Java
@@ -166,7 +167,7 @@ jobs:
166167
167168 # Run Qodana inspections
168169 - name : Qodana - Code Inspection
169- uses : JetBrains/qodana-action@v2024.2.3
170+ uses : JetBrains/qodana-action@v2024.2
170171 with :
171172 cache-default-branch-only : true
172173
@@ -184,7 +185,7 @@ jobs:
184185 tool-cache : false
185186 large-packages : false
186187
187- # Check out current repository
188+ # Check out the current repository
188189 - name : Fetch Sources
189190 uses : actions/checkout@v4
190191
@@ -197,9 +198,7 @@ jobs:
197198
198199 # Setup Gradle
199200 - name : Setup Gradle
200- uses : gradle/gradle-build-action@v3
201- with :
202- gradle-home-cache-cleanup : true
201+ uses : gradle/actions/setup-gradle@v4
203202
204203 # Cache Plugin Verifier IDEs
205204 - name : Setup Plugin Verifier IDEs Cache
@@ -231,17 +230,10 @@ jobs:
231230 contents : write
232231 steps :
233232
234- # Check out current repository
233+ # Check out the current repository
235234 - name : Fetch Sources
236235 uses : actions/checkout@v4
237236
238- # Set up Java environment for the next steps
239- - name : Setup Java
240- uses : actions/setup-java@v4
241- with :
242- distribution : zulu
243- java-version : 17
244-
245237 # Remove old release drafts by using the curl request for the available releases with a draft flag
246238 - name : Remove Old Release Drafts
247239 env :
@@ -256,7 +248,7 @@ jobs:
256248 env :
257249 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
258250 run : |
259- gh release create v${{ needs.build.outputs.version }} \
251+ gh release create " v${{ needs.build.outputs.version }}" \
260252 --draft \
261253 --title "v${{ needs.build.outputs.version }}" \
262254 --notes "$(cat << 'EOM'
0 commit comments