Skip to content

Commit 7f54b75

Browse files
committed
Update workflow
1 parent 77563df commit 7f54b75

File tree

2 files changed

+25
-35
lines changed

2 files changed

+25
-35
lines changed

.github/workflows/build.yml

Lines changed: 21 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,10 @@ on:
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+
2327
jobs:
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[email protected]
45+
uses: gradle/actions/wrapper-validation@v3
4246

4347
# Set up Java environment for the next steps
4448
- name: Setup Java
@@ -49,9 +53,7 @@ jobs:
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
@@ -69,8 +71,6 @@ jobs:
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
@@ -131,7 +129,7 @@ jobs:
131129

132130
# Upload the Kover report to CodeCov
133131
- name: Upload Code Coverage Report
134-
uses: codecov/codecov-action@v3
132+
uses: codecov/codecov-action@v4
135133
with:
136134
files: ${{ github.workspace }}/build/reports/kover/report.xml
137135

@@ -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@v2023.3.1
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
@@ -210,7 +209,7 @@ jobs:
210209

211210
# Run Verify Plugin task and IntelliJ Plugin Verifier tool
212211
- name: Run Plugin Verification tasks
213-
run: ./gradlew runPluginVerifier -Dplugin.verifier.home.dir=${{ needs.build.outputs.pluginVerifierHomeDir }}
212+
run: ./gradlew verifyPlugin -Dplugin.verifier.home.dir=${{ needs.build.outputs.pluginVerifierHomeDir }}
214213

215214
# Collect Plugin Verifier Result
216215
- name: Collect Plugin Verifier Result
@@ -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,10 +248,10 @@ 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'
263255
${{ needs.build.outputs.changelog }}
264256
EOM
265-
)"
257+
)"

.github/workflows/release.yml

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
pull-requests: write
1919
steps:
2020

21-
# Check out current repository
21+
# Check out the current repository
2222
- name: Fetch Sources
2323
uses: actions/checkout@v4
2424
with:
@@ -33,9 +33,7 @@ jobs:
3333

3434
# Setup Gradle
3535
- name: Setup Gradle
36-
uses: gradle/gradle-build-action@v3
37-
with:
38-
gradle-home-cache-cleanup: true
36+
uses: gradle/actions/setup-gradle@v4
3937

4038
# Set environment variables
4139
- name: Export Properties
@@ -51,7 +49,7 @@ jobs:
5149
echo "$CHANGELOG" >> $GITHUB_OUTPUT
5250
echo "EOF" >> $GITHUB_OUTPUT
5351
54-
# Update Unreleased section with the current release note
52+
# Update the Unreleased section with the current release note
5553
- name: Patch Changelog
5654
if: ${{ steps.properties.outputs.changelog != '' }}
5755
env:
@@ -100,4 +98,4 @@ jobs:
10098
--title "Changelog update - \`$VERSION\`" \
10199
--body "Current pull request contains patched \`CHANGELOG.md\` file for the \`$VERSION\` version." \
102100
--label "$LABEL" \
103-
--head $BRANCH
101+
--head $BRANCH

0 commit comments

Comments
 (0)