Skip to content

Commit 8807c5d

Browse files
committed
👷 refactor(build): upgrade template to v2.3.1
1 parent 5b9bdf1 commit 8807c5d

16 files changed

Lines changed: 160 additions & 205 deletions

.github/workflows/build.yml

Lines changed: 21 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,8 @@ jobs:
3030
build:
3131
name: Build
3232
runs-on: ubuntu-latest
33-
outputs:
34-
version: ${{ steps.properties.outputs.version }}
35-
changelog: ${{ steps.properties.outputs.changelog }}
3633
steps:
34+
3735
# Free GitHub Actions Environment Disk Space
3836
- name: Maximize Build Space
3937
uses: jlumbroso/free-disk-space@v1.3.1
@@ -43,11 +41,11 @@ jobs:
4341

4442
# Check out the current repository
4543
- name: Fetch Sources
46-
uses: actions/checkout@v5
44+
uses: actions/checkout@v4
4745

4846
# Set up the Java environment for the next steps
4947
- name: Setup Java
50-
uses: actions/setup-java@v5
48+
uses: actions/setup-java@v4
5149
with:
5250
distribution: zulu
5351
java-version: 21
@@ -56,20 +54,6 @@ jobs:
5654
- name: Setup Gradle
5755
uses: gradle/actions/setup-gradle@v4
5856

59-
# Set environment variables
60-
- name: Export Properties
61-
id: properties
62-
shell: bash
63-
run: |
64-
PROPERTIES="$(./gradlew properties --console=plain -q)"
65-
VERSION="$(echo "$PROPERTIES" | grep "^version:" | cut -f2- -d ' ')"
66-
CHANGELOG="$(./gradlew getChangelog --unreleased --no-header --console=plain -q)"
67-
68-
echo "version=$VERSION" >> $GITHUB_OUTPUT
69-
echo "changelog<<EOF" >> $GITHUB_OUTPUT
70-
echo "$CHANGELOG" >> $GITHUB_OUTPUT
71-
echo "EOF" >> $GITHUB_OUTPUT
72-
7357
# Build plugin
7458
- name: Build plugin
7559
run: ./gradlew buildPlugin
@@ -82,7 +66,9 @@ jobs:
8266
cd ${{ github.workspace }}/build/distributions
8367
FILENAME=`ls *.zip`
8468
unzip "$FILENAME" -d content
69+
8570
echo "filename=${FILENAME:0:-4}" >> $GITHUB_OUTPUT
71+
8672
# Store an already-built plugin as an artifact for downloading
8773
- name: Upload artifact
8874
uses: actions/upload-artifact@v4
@@ -96,6 +82,7 @@ jobs:
9682
needs: [ build ]
9783
runs-on: ubuntu-latest
9884
steps:
85+
9986
# Free GitHub Actions Environment Disk Space
10087
- name: Maximize Build Space
10188
uses: jlumbroso/free-disk-space@v1.3.1
@@ -105,11 +92,11 @@ jobs:
10592

10693
# Check out the current repository
10794
- name: Fetch Sources
108-
uses: actions/checkout@v5
95+
uses: actions/checkout@v4
10996

11097
# Set up the Java environment for the next steps
11198
- name: Setup Java
112-
uses: actions/setup-java@v5
99+
uses: actions/setup-java@v4
113100
with:
114101
distribution: zulu
115102
java-version: 21
@@ -159,21 +146,21 @@ jobs:
159146

160147
# Check out the current repository
161148
- name: Fetch Sources
162-
uses: actions/checkout@v5
149+
uses: actions/checkout@v4
163150
with:
164151
ref: ${{ github.event.pull_request.head.sha }} # to check out the actual pull request commit, not the merge commit
165152
fetch-depth: 0 # a full history is required for pull request analysis
166153

167154
# Set up the Java environment for the next steps
168155
- name: Setup Java
169-
uses: actions/setup-java@v5
156+
uses: actions/setup-java@v4
170157
with:
171158
distribution: zulu
172159
java-version: 21
173160

174161
# Run Qodana inspections
175162
- name: Qodana - Code Inspection
176-
uses: JetBrains/qodana-action@v2025.2.1
163+
uses: JetBrains/qodana-action@v2025.1.1
177164
with:
178165
cache-default-branch-only: true
179166

@@ -193,11 +180,11 @@ jobs:
193180

194181
# Check out the current repository
195182
- name: Fetch Sources
196-
uses: actions/checkout@v5
183+
uses: actions/checkout@v4
197184

198185
# Set up the Java environment for the next steps
199186
- name: Setup Java
200-
uses: actions/setup-java@v5
187+
uses: actions/setup-java@v4
201188
with:
202189
distribution: zulu
203190
java-version: 21
@@ -233,7 +220,7 @@ jobs:
233220

234221
# Check out the current repository
235222
- name: Fetch Sources
236-
uses: actions/checkout@v5
223+
uses: actions/checkout@v4
237224

238225
# Remove old release drafts by using the curl request for the available releases with a draft flag
239226
- name: Remove Old Release Drafts
@@ -249,10 +236,11 @@ jobs:
249236
env:
250237
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
251238
run: |
252-
gh release create "v${{ needs.build.outputs.version }}" \
239+
VERSION=$(./gradlew properties --property version --quiet --console=plain | tail -n 1 | cut -f2- -d ' ')
240+
RELEASE_NOTE="./build/tmp/release_note.txt"
241+
./gradlew getChangelog --unreleased --no-header --quiet --console=plain --output-file=$RELEASE_NOTE
242+
243+
gh release create $VERSION \
253244
--draft \
254-
--title "v${{ needs.build.outputs.version }}" \
255-
--notes "$(cat << 'EOM'
256-
${{ needs.build.outputs.changelog }}
257-
EOM
258-
)"
245+
--title $VERSION \
246+
--notes-file $RELEASE_NOTE

.github/workflows/release.yml

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -17,21 +17,23 @@ jobs:
1717
contents: write
1818
pull-requests: write
1919
steps:
20+
2021
# Free GitHub Actions Environment Disk Space
2122
- name: Maximize Build Space
2223
uses: jlumbroso/free-disk-space@v1.3.1
2324
with:
2425
tool-cache: false
2526
large-packages: false
27+
2628
# Check out the current repository
2729
- name: Fetch Sources
28-
uses: actions/checkout@v5
30+
uses: actions/checkout@v4
2931
with:
3032
ref: ${{ github.event.release.tag_name }}
3133

3234
# Set up the Java environment for the next steps
3335
- name: Setup Java
34-
uses: actions/setup-java@v5
36+
uses: actions/setup-java@v4
3537
with:
3638
distribution: zulu
3739
java-version: 21
@@ -42,19 +44,17 @@ jobs:
4244
with:
4345
cache-read-only: true
4446

45-
# Set environment variables
46-
- name: Export Properties
47-
id: properties
48-
shell: bash
47+
# Update the Unreleased section with the current release note
48+
- name: Patch Changelog
49+
if: ${{ github.event.release.body != '' }}
50+
env:
51+
CHANGELOG: ${{ github.event.release.body }}
4952
run: |
50-
CHANGELOG="$(cat << 'EOM' | sed -e 's/^[[:space:]]*$//g' -e '/./,$!d'
51-
${{ github.event.release.body }}
52-
EOM
53-
)"
54-
55-
echo "changelog<<EOF" >> $GITHUB_OUTPUT
56-
echo "$CHANGELOG" >> $GITHUB_OUTPUT
57-
echo "EOF" >> $GITHUB_OUTPUT
53+
RELEASE_NOTE="./build/tmp/release_note.txt"
54+
mkdir -p "$(dirname "$RELEASE_NOTE")"
55+
echo "$CHANGELOG" > $RELEASE_NOTE
56+
57+
./gradlew patchChangelog --release-note-file=$RELEASE_NOTE
5858
5959
# Publish the plugin to JetBrains Marketplace
6060
- name: Publish Plugin

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,11 @@ jobs:
3333

3434
# Check out the current repository
3535
- name: Fetch Sources
36-
uses: actions/checkout@v5
36+
uses: actions/checkout@v4
3737

3838
# Set up the Java environment for the next steps
3939
- name: Setup Java
40-
uses: actions/setup-java@v5
40+
uses: actions/setup-java@v4
4141
with:
4242
distribution: zulu
4343
java-version: 21

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
.DS_Store
12
.gradle
23
.idea
34
.intellijPlatform

.idea/gradle.xml

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.run/Run IDE for UI Tests.run.xml

Lines changed: 0 additions & 25 deletions
This file was deleted.

.run/Run Plugin.run.xml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,10 @@
1616
</option>
1717
<option name="vmOptions" value="" />
1818
</ExternalSystemSettings>
19-
<ExternalSystemDebugServerProcess>true</ExternalSystemDebugServerProcess>
19+
<ExternalSystemDebugServerProcess>false</ExternalSystemDebugServerProcess>
2020
<ExternalSystemReattachDebugProcess>true</ExternalSystemReattachDebugProcess>
2121
<DebugAllEnabled>false</DebugAllEnabled>
22+
<RunAsTest>false</RunAsTest>
2223
<method v="2" />
2324
</configuration>
2425
</component>

.run/Run Qodana.run.xml

Lines changed: 0 additions & 24 deletions
This file was deleted.

.run/Run Verifications.run.xml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,5 +19,7 @@
1919
<ExternalSystemDebugServerProcess>true</ExternalSystemDebugServerProcess>
2020
<ExternalSystemReattachDebugProcess>true</ExternalSystemReattachDebugProcess>
2121
<DebugAllEnabled>false</DebugAllEnabled>
22+
<RunAsTest>false</RunAsTest>
23+
<method v="2"/>
2224
</configuration>
2325
</component>

build.gradle.kts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
import org.jetbrains.changelog.Changelog
22
import org.jetbrains.changelog.markdownToHTML
3+
import org.jetbrains.intellij.platform.gradle.IntelliJPlatformType
34
import org.jetbrains.intellij.platform.gradle.TestFrameworkType
5+
import org.jetbrains.intellij.platform.gradle.models.ProductRelease
46

57
plugins {
68
id("java") // Java support
@@ -44,6 +46,9 @@ dependencies {
4446
// Plugin Dependencies. Uses `platformPlugins` property from the gradle.properties file for plugin from JetBrains Marketplace.
4547
plugins(providers.gradleProperty("platformPlugins").map { it.split(',') })
4648

49+
// Module Dependencies. Uses `platformBundledModules` property from the gradle.properties file for bundled IntelliJ Platform modules.
50+
bundledModules(providers.gradleProperty("platformBundledModules").map { it.split(',') })
51+
4752
testFramework(TestFrameworkType.Platform)
4853
}
4954
}
@@ -101,7 +106,6 @@ intellijPlatform {
101106

102107
pluginVerification {
103108
ides {
104-
recommended()
105109
}
106110
}
107111
}

0 commit comments

Comments
 (0)