generated from JetBrains/intellij-platform-plugin-template
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Migrate to IntelliJ Gradle Plugin 2.0 (#100)
Signed-off-by: Artem Zatsarynnyi <[email protected]>
- Loading branch information
1 parent
496762e
commit 242a947
Showing
11 changed files
with
137 additions
and
174 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,6 +20,10 @@ on: | |
# Trigger the workflow on any pull request | ||
pull_request: | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
|
||
# Prepare environment and build the plugin | ||
|
@@ -32,13 +36,13 @@ jobs: | |
pluginVerifierHomeDir: ${{ steps.properties.outputs.pluginVerifierHomeDir }} | ||
steps: | ||
|
||
# Check out current repository | ||
# Check out the current repository | ||
- name: Fetch Sources | ||
uses: actions/checkout@v4 | ||
|
||
# Validate wrapper | ||
- name: Gradle Wrapper Validation | ||
uses: gradle/wrapper-validation-action@v3.5.0 | ||
uses: gradle/actions/wrapper-validation@v3 | ||
|
||
# Set up Java environment for the next steps | ||
- name: Setup Java | ||
|
@@ -49,9 +53,7 @@ jobs: | |
|
||
# Setup Gradle | ||
- name: Setup Gradle | ||
uses: gradle/gradle-build-action@v3 | ||
with: | ||
gradle-home-cache-cleanup: true | ||
uses: gradle/actions/setup-gradle@v4 | ||
|
||
# Set environment variables | ||
- name: Export Properties | ||
|
@@ -69,8 +71,6 @@ jobs: | |
echo "$CHANGELOG" >> $GITHUB_OUTPUT | ||
echo "EOF" >> $GITHUB_OUTPUT | ||
./gradlew listProductsReleases # prepare list of IDEs for Plugin Verifier | ||
# Build plugin | ||
- name: Build plugin | ||
run: ./gradlew buildPlugin | ||
|
@@ -100,7 +100,7 @@ jobs: | |
runs-on: ubuntu-latest | ||
steps: | ||
|
||
# Check out current repository | ||
# Check out the current repository | ||
- name: Fetch Sources | ||
uses: actions/checkout@v4 | ||
|
||
|
@@ -113,9 +113,7 @@ jobs: | |
|
||
# Setup Gradle | ||
- name: Setup Gradle | ||
uses: gradle/gradle-build-action@v3 | ||
with: | ||
gradle-home-cache-cleanup: true | ||
uses: gradle/actions/setup-gradle@v4 | ||
|
||
# Run tests | ||
- name: Run Tests | ||
|
@@ -153,9 +151,12 @@ jobs: | |
tool-cache: false | ||
large-packages: false | ||
|
||
# Check out current repository | ||
# Check out the current repository | ||
- name: Fetch Sources | ||
uses: actions/checkout@v4 | ||
with: | ||
ref: ${{ github.event.pull_request.head.sha }} # to check out the actual pull request commit, not the merge commit | ||
fetch-depth: 0 # a full history is required for pull request analysis | ||
|
||
# Set up Java environment for the next steps | ||
- name: Setup Java | ||
|
@@ -166,7 +167,7 @@ jobs: | |
|
||
# Run Qodana inspections | ||
- name: Qodana - Code Inspection | ||
uses: JetBrains/[email protected].3 | ||
uses: JetBrains/[email protected] | ||
with: | ||
cache-default-branch-only: true | ||
|
||
|
@@ -184,7 +185,7 @@ jobs: | |
tool-cache: false | ||
large-packages: false | ||
|
||
# Check out current repository | ||
# Check out the current repository | ||
- name: Fetch Sources | ||
uses: actions/checkout@v4 | ||
|
||
|
@@ -197,9 +198,7 @@ jobs: | |
|
||
# Setup Gradle | ||
- name: Setup Gradle | ||
uses: gradle/gradle-build-action@v3 | ||
with: | ||
gradle-home-cache-cleanup: true | ||
uses: gradle/actions/setup-gradle@v4 | ||
|
||
# Cache Plugin Verifier IDEs | ||
- name: Setup Plugin Verifier IDEs Cache | ||
|
@@ -231,17 +230,10 @@ jobs: | |
contents: write | ||
steps: | ||
|
||
# Check out current repository | ||
# Check out the current repository | ||
- name: Fetch Sources | ||
uses: actions/checkout@v4 | ||
|
||
# Set up Java environment for the next steps | ||
- name: Setup Java | ||
uses: actions/setup-java@v4 | ||
with: | ||
distribution: zulu | ||
java-version: 17 | ||
|
||
# Remove old release drafts by using the curl request for the available releases with a draft flag | ||
- name: Remove Old Release Drafts | ||
env: | ||
|
@@ -256,7 +248,7 @@ jobs: | |
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
run: | | ||
gh release create v${{ needs.build.outputs.version }} \ | ||
gh release create "v${{ needs.build.outputs.version }}" \ | ||
--draft \ | ||
--title "v${{ needs.build.outputs.version }}" \ | ||
--notes "$(cat << 'EOM' | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.