Skip to content

Commit 620054b

Browse files
committed
Merge branch 'release/1.3.0'
2 parents 339f675 + ab4c9c5 commit 620054b

22 files changed

+269
-287
lines changed

.github/workflows/build.yml

Lines changed: 69 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,20 @@
11
# GitHub Actions Workflow is created for testing and preparing the plugin release in the following steps:
2-
# - validate Gradle Wrapper,
3-
# - run 'test' and 'verifyPlugin' tasks,
4-
# - run Qodana inspections,
5-
# - run 'buildPlugin' task and prepare artifact for the further tests,
6-
# - run 'runPluginVerifier' task,
7-
# - create a draft release.
2+
# - Validate Gradle Wrapper.
3+
# - Run 'test' and 'verifyPlugin' tasks.
4+
# - Run Qodana inspections.
5+
# - Run the 'buildPlugin' task and prepare artifact for further tests.
6+
# - Run the 'runPluginVerifier' task.
7+
# - Create a draft release.
88
#
9-
# Workflow is triggered on push and pull_request events.
9+
# The workflow is triggered on push and pull_request events.
1010
#
1111
# GitHub Actions reference: https://help.github.com/en/actions
12+
#
13+
## JBIJPPTPL
1214

1315
name: Build
1416
on:
15-
# Trigger the workflow on pushes to only the 'master', 'support' and 'release' branches
17+
# Trigger the workflow on pushes to only the 'main' branch (this avoids duplicate checks being run e.g., for dependabot pull requests)
1618
push:
1719
branches:
1820
- master
@@ -24,34 +26,44 @@ on:
2426
# Trigger the workflow on manual dispatch
2527
workflow_dispatch:
2628

29+
concurrency:
30+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
31+
cancel-in-progress: true
32+
2733
jobs:
34+
guard:
35+
name: Usage guard
36+
runs-on: ubuntu-latest
37+
steps:
38+
# Uses the action-usage-guard action
39+
- name: Run Action Usage Guard
40+
uses: nekofar/action-usage-guard@develop
41+
with:
42+
# GitHub access token for authentication.
43+
token: ${{ secrets.ACCESS_TOKEN }}
44+
# Defines the threshold for the usage guard.
45+
threshold: 70
2846

2947
# Prepare environment and build the plugin
3048
build:
3149
name: Build
3250
runs-on: ubuntu-latest
51+
needs: [ guard ]
3352
outputs:
3453
version: ${{ steps.properties.outputs.version }}
3554
changelog: ${{ steps.changelog.outputs.changelog }}
3655
pluginVerifierHomeDir: ${{ steps.properties.outputs.pluginVerifierHomeDir }}
3756
steps:
3857

39-
# Free GitHub Actions Environment Disk Space
40-
- name: Maximize Build Space
41-
run: |
42-
sudo rm -rf /usr/share/dotnet
43-
sudo rm -rf /usr/local/lib/android
44-
sudo rm -rf /opt/ghc
45-
46-
# Check out current repository
58+
# Check out the current repository
4759
- name: Fetch Sources
4860
uses: actions/checkout@v4.2.0
4961

5062
# Validate wrapper
5163
- name: Gradle Wrapper Validation
52-
uses: gradle/wrapper-validation-action@v3.4.0
64+
uses: gradle/actions/wrapper-validation@v4.1.0
5365

54-
# Setup Java environment for the next steps
66+
# Set up Java environment for the next steps
5567
- name: Setup Java
5668
uses: actions/setup-java@v4.4.0
5769
with:
@@ -60,7 +72,7 @@ jobs:
6072

6173
# Setup Gradle
6274
- name: Setup Gradle
63-
uses: gradle/gradle-build-action@v3.5.0
75+
uses: gradle/actions/setup-gradle@v4.1.0
6476

6577
# Set environment variables
6678
- name: Export Properties
@@ -74,8 +86,6 @@ jobs:
7486
echo "version=$VERSION" >> $GITHUB_OUTPUT
7587
echo "name=$NAME" >> $GITHUB_OUTPUT
7688
echo "pluginVerifierHomeDir=~/.pluginVerifier" >> $GITHUB_OUTPUT
77-
78-
./gradlew listProductsReleases # prepare list of IDEs for Plugin Verifier
7989
8090
# Extract changelog information
8191
- name: Prepare Changelog
@@ -121,11 +131,11 @@ jobs:
121131
runs-on: ubuntu-latest
122132
steps:
123133

124-
# Check out current repository
134+
# Check out the current repository
125135
- name: Fetch Sources
126136
uses: actions/checkout@v4.2.0
127137

128-
# Setup Java environment for the next steps
138+
# Set up Java environment for the next steps
129139
- name: Setup Java
130140
uses: actions/setup-java@v4.4.0
131141
with:
@@ -134,7 +144,7 @@ jobs:
134144

135145
# Setup Gradle
136146
- name: Setup Gradle
137-
uses: gradle/gradle-build-action@v3.5.0
147+
uses: gradle/actions/setup-gradle@v4.1.0
138148

139149
# Run tests
140150
- name: Run Tests
@@ -148,11 +158,11 @@ jobs:
148158
name: tests-result
149159
path: ${{ github.workspace }}/build/reports/tests
150160

151-
# Upload Kover report to CodeCov
161+
# Upload the Kover report to CodeCov
152162
- name: Upload Code Coverage Report
153163
uses: codecov/codecov-action@v4.6.0
154164
with:
155-
files: ${{ github.workspace }}/build/reports/kover/xml/report.xml
165+
files: ${{ github.workspace }}/build/reports/kover/report.xml
156166

157167
# Run Qodana inspections and provide report
158168
inspectCode:
@@ -165,11 +175,21 @@ jobs:
165175
pull-requests: write
166176
steps:
167177

168-
# Check out current repository
178+
# Free GitHub Actions Environment Disk Space
179+
- name: Maximize Build Space
180+
uses: jlumbroso/free-disk-space@main
181+
with:
182+
tool-cache: false
183+
large-packages: false
184+
185+
# Check out the current repository
169186
- name: Fetch Sources
170187
uses: actions/checkout@v4.2.0
188+
with:
189+
ref: ${{ github.event.pull_request.head.sha }} # to check out the actual pull request commit, not the merge commit
190+
fetch-depth: 0 # a full history is required for pull request analysis
171191

172-
# Setup Java environment for the next steps
192+
# Set up Java environment for the next steps
173193
- name: Setup Java
174194
uses: actions/setup-java@v4.4.0
175195
with:
@@ -185,20 +205,22 @@ jobs:
185205
# Run plugin structure verification along with IntelliJ Plugin Verifier
186206
verify:
187207
name: Verify plugin
188-
needs: [ build, test, inspectCode ]
208+
needs: [ build ]
189209
runs-on: ubuntu-latest
190210
steps:
191-
# Remove files to save space
192-
- name: Remove unnecessary files
193-
run: |
194-
sudo rm -rf /usr/share/dotnet
195-
sudo rm -rf "$AGENT_TOOLSDIRECTORY"
196211

197-
# Check out current repository
212+
# Free GitHub Actions Environment Disk Space
213+
- name: Maximize Build Space
214+
uses: jlumbroso/free-disk-space@main
215+
with:
216+
tool-cache: false
217+
large-packages: false
218+
219+
# Check out the current repository
198220
- name: Fetch Sources
199221
uses: actions/checkout@v4.2.0
200222

201-
# Setup Java environment for the next steps
223+
# Set up Java environment for the next steps
202224
- name: Setup Java
203225
uses: actions/setup-java@v4.4.0
204226
with:
@@ -207,7 +229,7 @@ jobs:
207229

208230
# Setup Gradle
209231
- name: Setup Gradle
210-
uses: gradle/gradle-build-action@v3.5.0
232+
uses: gradle/actions/setup-gradle@v4.1.0
211233

212234
# Cache Plugin Verifier IDEs
213235
- name: Setup Plugin Verifier IDEs Cache
@@ -218,7 +240,7 @@ jobs:
218240

219241
# Run Verify Plugin task and IntelliJ Plugin Verifier tool
220242
- name: Run Plugin Verification tasks
221-
run: ./gradlew runPluginVerifier -Dplugin.verifier.home.dir=${{ needs.build.outputs.pluginVerifierHomeDir }}
243+
run: ./gradlew verifyPlugin -Dplugin.verifier.home.dir=${{ needs.build.outputs.pluginVerifierHomeDir }}
222244

223245
# Collect Plugin Verifier Result
224246
- name: Collect Plugin Verifier Result
@@ -233,23 +255,16 @@ jobs:
233255
releaseDraft:
234256
name: Release draft
235257
if: github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/heads/support/')
236-
needs: [ build, verify ]
258+
needs: [ build, test, inspectCode, verify ]
237259
runs-on: ubuntu-latest
238260
permissions:
239261
contents: write
240262
steps:
241263

242-
# Check out current repository
264+
# Check out the current repository
243265
- name: Fetch Sources
244266
uses: actions/checkout@v4.2.0
245267

246-
# Setup Java environment for the next steps
247-
- name: Setup Java
248-
uses: actions/setup-java@v4.4.0
249-
with:
250-
distribution: zulu
251-
java-version: 17
252-
253268
# Remove old release drafts by using the curl request for the available releases with a draft flag
254269
- name: Remove Old Release Drafts
255270
env:
@@ -261,17 +276,10 @@ jobs:
261276
262277
# Create a new release draft which is not publicly visible and requires manual acceptance
263278
- name: Create Release Draft
264-
env:
265-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
266-
run: |
267-
gh release create v${{ needs.build.outputs.version }} \
268-
--draft \
269-
--title "v${{ needs.build.outputs.version }}" \
270-
--notes "$(cat << 'EOM'
271-
${{ needs.build.outputs.changelog }}
272-
EOM
273-
)"
274-
275-
concurrency:
276-
group: ${{ github.workflow }}-${{ github.ref }}
277-
cancel-in-progress: true
279+
uses: nekofar/create-github-release@v1.0.14
280+
with:
281+
tag: v${{ needs.build.outputs.version }} # The name of the tag to be released
282+
title: v${{ needs.build.outputs.version }} # The title for the release
283+
notes: ${{ needs.build.outputs.changelog }} # The release notes generated in the previous step
284+
draft: true # The release will be created as a draft
285+
prerelease: ${{ contains(needs.build.outputs.version, '-rc') || contains(needs.build.outputs.version, '-beta') || contains(needs.build.outputs.version, '-alpha') }} # Conditions to mark the release as a pre-release

.github/workflows/changelog.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,17 @@ jobs:
2020
with:
2121
fetch-depth: 0
2222

23+
# Set up Java environment for the next steps
24+
- name: Setup Java
25+
uses: actions/setup-java@v4.4.0
26+
with:
27+
distribution: zulu
28+
java-version: 17
29+
30+
# Setup Gradle
31+
- name: Setup Gradle
32+
uses: gradle/actions/setup-gradle@v4.1.0
33+
2334
# Set environment variables
2435
- name: Export Properties
2536
id: properties

.github/workflows/release.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ on:
99

1010
jobs:
1111

12-
# Prepare and publish the plugin to the Marketplace repository
12+
# Prepare and publish the plugin to JetBrains Marketplace repository
1313
release:
1414
name: Publish Plugin
1515
runs-on: ubuntu-latest
@@ -18,13 +18,13 @@ 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.2.0
2424
with:
2525
ref: ${{ github.event.release.tag_name }}
2626

27-
# Setup Java environment for the next steps
27+
# Set up Java environment for the next steps
2828
- name: Setup Java
2929
uses: actions/setup-java@v4.4.0
3030
with:
@@ -33,9 +33,9 @@ jobs:
3333

3434
# Setup Gradle
3535
- name: Setup Gradle
36-
uses: gradle/gradle-build-action@v3.5.0
36+
uses: gradle/actions/setup-gradle@v4.1.0
3737

38-
# Publish the plugin to the Marketplace
38+
# Publish the plugin to JetBrains Marketplace
3939
- name: Publish Plugin
4040
env:
4141
PUBLISH_TOKEN: ${{ secrets.PUBLISH_TOKEN }}

.github/workflows/run-ui-tests.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
# GitHub Actions Workflow for launching UI tests on Linux, Windows, and Mac in the following steps:
2-
# - prepare and launch IDE with your plugin and robot-server plugin, which is needed to interact with UI
3-
# - wait for IDE to start
4-
# - run UI tests with separate Gradle task
2+
# - Prepare and launch IDE with your plugin and robot-server plugin, which is needed to interact with the UI.
3+
# - Wait for IDE to start.
4+
# - Run UI tests with a separate Gradle task.
55
#
6-
# Please check https://github.com/JetBrains/intellij-ui-test-robot for information about UI tests with IntelliJ Platform
6+
# Please check https://github.com/JetBrains/intellij-ui-test-robot for information about UI tests with IntelliJ Platform.
77
#
88
# Workflow is triggered manually.
99

@@ -31,11 +31,11 @@ jobs:
3131

3232
steps:
3333

34-
# Check out current repository
34+
# Check out the current repository
3535
- name: Fetch Sources
3636
uses: actions/checkout@v4.2.0
3737

38-
# Setup Java environment for the next steps
38+
# Set up Java environment for the next steps
3939
- name: Setup Java
4040
uses: actions/setup-java@v4.4.0
4141
with:
@@ -44,7 +44,7 @@ jobs:
4444

4545
# Setup Gradle
4646
- name: Setup Gradle
47-
uses: gradle/gradle-build-action@v3.5.0
47+
uses: gradle/actions/setup-gradle@v4.1.0
4848

4949
# Run IDEA prepared for UI testing
5050
- name: Run IDE

0 commit comments

Comments
 (0)