2323 - " gradle.properties"
2424 - " README.md"
2525
26+ concurrency :
27+ group : ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
28+ cancel-in-progress : true
29+
2630jobs :
2731
28- # Prepare environment and build the plugin
32+ # Prepare the environment and build the plugin
2933 build :
3034 name : Build
3135 runs-on : ubuntu-latest
32- outputs :
33- version : ${{ steps.properties.outputs.version }}
34- changelog : ${{ steps.properties.outputs.changelog }}
35- pluginVerifierHomeDir : ${{ steps.properties.outputs.pluginVerifierHomeDir }}
3636 steps :
3737
38- # Check out current repository
38+ # Free GitHub Actions Environment Disk Space
39+ - name : Maximize Build Space
40+ 41+ with :
42+ tool-cache : false
43+ large-packages : false
44+
45+ # Check out the current repository
3946 - name : Fetch Sources
4047 uses : actions/checkout@v4
4148
42- # Validate wrapper
43- - name : Gradle Wrapper Validation
44- 45-
46- # Set up Java environment for the next steps
49+ # Set up the Java environment for the next steps
4750 - name : Setup Java
4851 uses : actions/setup-java@v4
4952 with :
5053 distribution : zulu
51- java-version : 17
54+ java-version : 21
5255
5356 # Setup Gradle
5457 - name : Setup Gradle
55- uses : gradle/gradle-build-action@v2
56- with :
57- gradle-home-cache-cleanup : true
58-
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 "pluginVerifierHomeDir=~/.pluginVerifier" >> $GITHUB_OUTPUT
70-
71- echo "changelog<<EOF" >> $GITHUB_OUTPUT
72- echo "$CHANGELOG" >> $GITHUB_OUTPUT
73- echo "EOF" >> $GITHUB_OUTPUT
74-
75- ./gradlew listProductsReleases # prepare list of IDEs for Plugin Verifier
58+ uses : gradle/actions/setup-gradle@v4
7659
7760 # Build plugin
7861 - name : Build plugin
8972
9073 echo "filename=${FILENAME:0:-4}" >> $GITHUB_OUTPUT
9174
92- # Store already-built plugin as an artifact for downloading
75+ # Store an already-built plugin as an artifact for downloading
9376 - name : Upload artifact
94- uses : actions/upload-artifact@v3
77+ uses : actions/upload-artifact@v4
9578 with :
9679 name : ${{ steps.artifact.outputs.filename }}
9780 path : ./build/distributions/content/*/*
@@ -103,22 +86,29 @@ jobs:
10386 runs-on : ubuntu-latest
10487 steps :
10588
106- # Check out current repository
89+ # Free GitHub Actions Environment Disk Space
90+ - name : Maximize Build Space
91+ 92+ with :
93+ tool-cache : false
94+ large-packages : false
95+
96+ # Check out the current repository
10797 - name : Fetch Sources
10898 uses : actions/checkout@v4
10999
110- # Set up Java environment for the next steps
100+ # Set up the Java environment for the next steps
111101 - name : Setup Java
112102 uses : actions/setup-java@v4
113103 with :
114104 distribution : zulu
115- java-version : 17
105+ java-version : 21
116106
117107 # Setup Gradle
118108 - name : Setup Gradle
119- uses : gradle/gradle-build-action@v2
109+ uses : gradle/actions/setup-gradle@v4
120110 with :
121- gradle-home- cache-cleanup : true
111+ cache-read-only : true
122112
123113 # Run tests
124114 - name : Run Tests
@@ -127,7 +117,7 @@ jobs:
127117 # Collect Tests Result of failed tests
128118 - name : Collect Tests Result
129119 if : ${{ failure() }}
130- uses : actions/upload-artifact@v3
120+ uses : actions/upload-artifact@v4
131121 with :
132122 name : tests-result
133123 path : ${{ github.workspace }}/build/reports/tests
@@ -141,69 +131,55 @@ jobs:
141131
142132 # Free GitHub Actions Environment Disk Space
143133 - name : Maximize Build Space
144- uses : jlumbroso/free-disk-space@main
134+ uses : jlumbroso/free-disk-space@v1.3.1
145135 with :
146136 tool-cache : false
147137 large-packages : false
148138
149- # Check out current repository
139+ # Check out the current repository
150140 - name : Fetch Sources
151141 uses : actions/checkout@v4
152142
153- # Set up Java environment for the next steps
143+ # Set up the Java environment for the next steps
154144 - name : Setup Java
155145 uses : actions/setup-java@v4
156146 with :
157147 distribution : zulu
158- java-version : 17
148+ java-version : 21
159149
160150 # Setup Gradle
161151 - name : Setup Gradle
162- uses : gradle/gradle-build-action@v2
163- with :
164- gradle-home-cache-cleanup : true
165-
166- # Cache Plugin Verifier IDEs
167- - name : Setup Plugin Verifier IDEs Cache
168- uses : actions/cache@v3
152+ uses : gradle/actions/setup-gradle@v4
169153 with :
170- path : ${{ needs.build.outputs.pluginVerifierHomeDir }}/ides
171- key : plugin-verifier-${{ hashFiles('build/listProductsReleases.txt') }}
154+ cache-read-only : true
172155
173156 # Run Verify Plugin task and IntelliJ Plugin Verifier tool
174157 - name : Run Plugin Verification tasks
175- run : ./gradlew runPluginVerifier -Dplugin.verifier.home.dir=${{ needs.build.outputs.pluginVerifierHomeDir }}
158+ run : ./gradlew verifyPlugin
176159
177160 # Collect Plugin Verifier Result
178161 - name : Collect Plugin Verifier Result
179162 if : ${{ always() }}
180- uses : actions/upload-artifact@v3
163+ uses : actions/upload-artifact@v4
181164 with :
182165 name : pluginVerifier-result
183166 path : ${{ github.workspace }}/build/reports/pluginVerifier
184167
185168 # Prepare a draft release for GitHub Releases page for the manual verification
186- # If accepted and published, release workflow would be triggered
169+ # If accepted and published, the release workflow would be triggered
187170 releaseDraft :
188171 name : Release draft
189172 if : github.event_name != 'pull_request'
190- needs : [ build, test, verify ]
173+ needs : [ build, test, inspectCode, verify ]
191174 runs-on : ubuntu-latest
192175 permissions :
193176 contents : write
194177 steps :
195178
196- # Check out current repository
179+ # Check out the current repository
197180 - name : Fetch Sources
198181 uses : actions/checkout@v4
199182
200- # Set up Java environment for the next steps
201- - name : Setup Java
202- uses : actions/setup-java@v4
203- with :
204- distribution : zulu
205- java-version : 17
206-
207183 # Remove old release drafts by using the curl request for the available releases with a draft flag
208184 - name : Remove Old Release Drafts
209185 env :
@@ -218,10 +194,11 @@ jobs:
218194 env :
219195 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
220196 run : |
221- gh release create v${{ needs.build.outputs.version }} \
197+ VERSION=$(./gradlew properties --property version --quiet --console=plain | tail -n 1 | cut -f2- -d ' ')
198+ RELEASE_NOTE="./build/tmp/release_note.txt"
199+ ./gradlew getChangelog --unreleased --no-header --quiet --console=plain --output-file=$RELEASE_NOTE
200+
201+ gh release create $VERSION \
222202 --draft \
223- --title "v${{ needs.build.outputs.version }}" \
224- --notes "$(cat << 'EOM'
225- ${{ needs.build.outputs.changelog }}
226- EOM
227- )"
203+ --title $VERSION \
204+ --notes-file $RELEASE_NOTE
0 commit comments