Skip to content

Commit 4bad3c7

Browse files
committed
Merge branch 'release/1.2.18'
2 parents bdbe619 + 96b7cab commit 4bad3c7

21 files changed

+396
-320
lines changed

.github/ISSUE_TEMPLATE/bug_report.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
11
name: Bug report
22
description: Create a report to help us improve
33

4-
title: '[Bug]: '
4+
---
5+
title: ''
56
labels:
67
- bug
78
assignees:
89
- nekofar
910

11+
---
1012
body:
1113
- type: textarea
1214
attributes:

.github/ISSUE_TEMPLATE/feature_request.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
11
name: Feature request
22
description: Suggest an idea for this project
33

4-
title: '[Feature]: '
4+
---
5+
title: ''
56
labels:
67
- enhancement
78
assignees:
89
- nekofar
910

11+
---
1012
body:
1113
- type: textarea
1214
attributes:

.github/workflows/build.yml

Lines changed: 89 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,15 @@
1+
# 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.
8+
#
9+
# Workflow is triggered on push and pull_request events.
10+
#
11+
# GitHub Actions reference: https://help.github.com/en/actions
12+
113
name: Build
214
on:
315
# Trigger the workflow on pushes to only the 'master', 'support' and 'release' branches
@@ -14,15 +26,14 @@ on:
1426

1527
jobs:
1628

17-
# Run Gradle Wrapper Validation Action to verify the wrapper's checksum
18-
# Run verifyPlugin, and IntelliJ Plugin Verifier
19-
# Build plugin and provide the artifact for the next workflow jobs
29+
# Prepare environment and build the plugin
2030
build:
2131
name: Build
2232
runs-on: ubuntu-latest
2333
outputs:
2434
version: ${{ steps.properties.outputs.version }}
2535
changelog: ${{ steps.changelog.outputs.changelog }}
36+
pluginVerifierHomeDir: ${{ steps.properties.outputs.pluginVerifierHomeDir }}
2637
steps:
2738

2839
# Free GitHub Actions Environment Disk Space
@@ -40,13 +51,9 @@ jobs:
4051
- name: Gradle Wrapper Validation
4152
uses: gradle/wrapper-validation-action@v1.0.6
4253

43-
# Setup Java 11 environment for the next steps
44-
- name: Setup Java
45-
uses: actions/setup-java@v3.11.0
46-
with:
47-
distribution: zulu
48-
java-version: 11
49-
cache: gradle
54+
# Setup Gradle
55+
- name: Setup Gradle
56+
uses: gradle/gradle-build-action@v2.4.2
5057

5158
# Set environment variables
5259
- name: Export Properties
@@ -57,9 +64,9 @@ jobs:
5764
VERSION="$(echo "$PROPERTIES" | grep "^version:" | cut -f2- -d ' ')"
5865
NAME="$(echo "$PROPERTIES" | grep "^pluginName:" | cut -f2- -d ' ')"
5966
60-
echo "::set-output name=version::$VERSION"
61-
echo "::set-output name=name::$NAME"
62-
echo "::set-output name=pluginVerifierHomeDir::~/.pluginVerifier"
67+
echo "version=$VERSION" >> $GITHUB_OUTPUT
68+
echo "name=$NAME" >> $GITHUB_OUTPUT
69+
echo "pluginVerifierHomeDir=~/.pluginVerifier" >> $GITHUB_OUTPUT
6370
6471
./gradlew listProductsReleases # prepare list of IDEs for Plugin Verifier
6572
@@ -78,16 +85,58 @@ jobs:
7885
echo "$CHANGELOG" >> $GITHUB_OUTPUT
7986
echo "EOF" >> $GITHUB_OUTPUT
8087
88+
# Build plugin
89+
- name: Build plugin
90+
run: ./gradlew buildPlugin
91+
92+
# Prepare plugin archive content for creating artifact
93+
- name: Prepare Plugin Artifact
94+
id: artifact
95+
shell: bash
96+
run: |
97+
cd ${{ github.workspace }}/build/distributions
98+
FILENAME=`ls *.zip`
99+
unzip "$FILENAME" -d content
100+
101+
echo "filename=${FILENAME:0:-4}" >> $GITHUB_OUTPUT
102+
103+
# Store already-built plugin as an artifact for downloading
104+
- name: Upload artifact
105+
uses: actions/upload-artifact@v3.1.2
106+
with:
107+
name: ${{ steps.artifact.outputs.filename }}
108+
path: ./build/distributions/content/*/*
109+
110+
# Run plugin structure verification along with IntelliJ Plugin Verifier
111+
verify:
112+
name: Verify plugin
113+
needs: build
114+
runs-on: ubuntu-latest
115+
steps:
116+
# Remove files to save space
117+
- name: Remove unnecessary files
118+
run: |
119+
sudo rm -rf /usr/share/dotnet
120+
sudo rm -rf "$AGENT_TOOLSDIRECTORY"
121+
122+
# Check out current repository
123+
- name: Fetch Sources
124+
uses: actions/checkout@v3.5.3
125+
126+
# Setup Gradle
127+
- name: Setup Gradle
128+
uses: gradle/gradle-build-action@v2.4.2
129+
81130
# Cache Plugin Verifier IDEs
82131
- name: Setup Plugin Verifier IDEs Cache
83132
uses: actions/cache@v3.3.1
84133
with:
85-
path: ${{ steps.properties.outputs.pluginVerifierHomeDir }}/ides
134+
path: ${{ needs.build.outputs.pluginVerifierHomeDir }}/ides
86135
key: plugin-verifier-${{ hashFiles('build/listProductsReleases.txt') }}
87136

88137
# Run Verify Plugin task and IntelliJ Plugin Verifier tool
89138
- name: Run Plugin Verification tasks
90-
run: ./gradlew runPluginVerifier -Pplugin.verifier.home.dir=${{ steps.properties.outputs.pluginVerifierHomeDir }}
139+
run: ./gradlew runPluginVerifier -Dplugin.verifier.home.dir=${{ needs.build.outputs.pluginVerifierHomeDir }}
91140

92141
# Collect Plugin Verifier Result
93142
- name: Collect Plugin Verifier Result
@@ -97,38 +146,44 @@ jobs:
97146
name: pluginVerifier-result
98147
path: ${{ github.workspace }}/build/reports/pluginVerifier
99148

100-
# Prepare plugin archive content for creating artifact
101-
- name: Prepare Plugin Artifact
102-
id: artifact
103-
shell: bash
104-
run: |
105-
cd ${{ github.workspace }}/build/distributions
106-
FILENAME=`ls *.zip`
107-
unzip "$FILENAME" -d content
108-
109-
echo "::set-output name=filename::${FILENAME:0:-4}"
149+
# Run Qodana inspections and provide report
150+
inspectCode:
151+
name: Inspect code
152+
needs: build
153+
runs-on: ubuntu-latest
154+
permissions:
155+
contents: write
156+
checks: write
157+
pull-requests: write
158+
steps:
110159

111-
# Store already-built plugin as an artifact for downloading
112-
- name: Upload artifact
113-
uses: actions/upload-artifact@v3.1.2
160+
# Check out current repository
161+
- name: Fetch Sources
162+
uses: actions/checkout@v3.5.3
163+
164+
# Run Qodana inspections
165+
- name: Qodana - Code Inspection
166+
if: ${{ github.actor != 'dependabot[bot]' }}
167+
uses: JetBrains/qodana-action@v2023.1.5
114168
with:
115-
name: ${{ steps.artifact.outputs.filename }}
116-
path: ./build/distributions/content/*/*
169+
cache-default-branch-only: true
117170

118171
# Prepare a draft release for GitHub Releases page for the manual verification
119172
# If accepted and published, release workflow would be triggered
120173
releaseDraft:
121-
name: Release Draft
174+
name: Release draft
122175
if: github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/heads/support/')
123-
needs: build
176+
needs: [ build, verify, inspectCode ]
124177
runs-on: ubuntu-latest
178+
permissions:
179+
contents: write
125180
steps:
126181

127182
# Check out current repository
128183
- name: Fetch Sources
129184
uses: actions/checkout@v3.5.2
130185

131-
# Remove old release drafts by using the curl request for the available releases with draft flag
186+
# Remove old release drafts by using the curl request for the available releases with a draft flag
132187
- name: Remove Old Release Drafts
133188
env:
134189
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
@@ -137,7 +192,7 @@ jobs:
137192
--jq '.[] | select(.draft == true) | .id' \
138193
| xargs -I '{}' gh api -X DELETE repos/{owner}/{repo}/releases/{}
139194
140-
# Create new release draft - which is not publicly visible and requires manual acceptance
195+
# Create a new release draft which is not publicly visible and requires manual acceptance
141196
- name: Create Release Draft
142197
env:
143198
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
@@ -150,7 +205,6 @@ jobs:
150205
EOM
151206
)"
152207
153-
154208
concurrency:
155209
group: ${{ github.workflow }}-${{ github.ref }}
156210
cancel-in-progress: true

.github/workflows/code_quality.yml

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

.github/workflows/release.yml

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
# GitHub Actions Workflow created for handling the release process based on the draft release prepared with the Build workflow.
2+
# Running the publishPlugin task requires all following secrets to be provided: PUBLISH_TOKEN, PRIVATE_KEY, PRIVATE_KEY_PASSWORD, CERTIFICATE_CHAIN.
3+
# See https://plugins.jetbrains.com/docs/intellij/plugin-signing.html for more information.
14

25
name: Release & Publish
36
on:
@@ -10,6 +13,9 @@ jobs:
1013
release:
1114
name: Publish Plugin
1215
runs-on: ubuntu-latest
16+
permissions:
17+
contents: write
18+
pull-requests: write
1319
steps:
1420

1521
# Check out current repository
@@ -18,18 +24,21 @@ jobs:
1824
with:
1925
ref: ${{ github.event.release.tag_name }}
2026

21-
# Setup Java 11 environment for the next steps
27+
# Setup Java environment for the next steps
2228
- name: Setup Java
2329
uses: actions/setup-java@v3.11.0
2430
with:
2531
distribution: zulu
26-
java-version: 11
32+
java-version: 17
2733
cache: gradle
2834

2935
# Publish the plugin to the Marketplace
3036
- name: Publish Plugin
3137
env:
3238
PUBLISH_TOKEN: ${{ secrets.PUBLISH_TOKEN }}
39+
CERTIFICATE_CHAIN: ${{ secrets.CERTIFICATE_CHAIN }}
40+
PRIVATE_KEY: ${{ secrets.PRIVATE_KEY }}
41+
PRIVATE_KEY_PASSWORD: ${{ secrets.PRIVATE_KEY_PASSWORD }}
3342
run: ./gradlew publishPlugin
3443

3544
# Upload artifact as a release asset
@@ -40,4 +49,4 @@ jobs:
4049

4150
concurrency:
4251
group: ${{ github.workflow }}-${{ github.ref }}
43-
cancel-in-progress: true
52+
cancel-in-progress: true

0 commit comments

Comments
 (0)