Skip to content

2025.1 Build Support #263

2025.1 Build Support

2025.1 Build Support #263

Workflow file for this run

# GitHub Actions Workflow created for testing and preparing the plugin release in following steps:
# - validate Gradle Wrapper,
# - run test and verifyPlugin tasks,
# - run buildPlugin task and prepare artifact for the further tests,
# - run IntelliJ Plugin Verifier,
# - create a draft release.
#
# Workflow is triggered on push and pull_request events.
#
# Docs:
# - GitHub Actions: https://help.github.com/en/actions
# - IntelliJ Plugin Verifier GitHub Action: https://github.com/ChrisCarini/intellij-platform-plugin-verifier-action
#
name: Build
on:
pull_request:
branches:
- main
jobs:
# Run Gradle Wrapper Validation Action to verify the wrapper's checksum
gradleValidation:
name: Gradle Wrapper
runs-on: ubuntu-latest
steps:
- name: Fetch Sources
uses: actions/checkout@v2
- name: Gradle Wrapper Validation
uses: gradle/wrapper-validation-action@v1.0.3
# Run verifyPlugin and test Gradle tasks
test:
name: Test
needs: gradleValidation
runs-on: ubuntu-latest
steps:
- name: Setup Java
uses: actions/setup-java@v2
with:
java-version: 21
distribution: 'zulu'
- name: Fetch Sources
uses: actions/checkout@v2
- name: Run Linters and Test
run: ./gradlew check
- name: Verify Plugin
run: ./gradlew runPluginVerifier
# Build plugin with buildPlugin Gradle task and provide the artifact for the next workflow jobs
# Requires test job to be passed
build:
name: Build
needs: test
runs-on: ubuntu-latest
outputs:
name: ${{ steps.properties.outputs.name }}
version: ${{ steps.properties.outputs.version }}
artifact: ${{ steps.properties.outputs.artifact }}
steps:
- name: Setup Java
uses: actions/setup-java@v2
with:
java-version: 21
distribution: 'zulu'
- name: Fetch Sources
uses: actions/checkout@v2
- name: Build Plugin
run: ./gradlew buildPlugin
# Upload plugin artifact to make it available in the next jobs
- name: Upload artifact
uses: actions/upload-artifact@v2.2.3
with:
name: plugin-artifact
path: ./build/distributions/${{ needs.build.outputs.artifact }}
# Verify built plugin using IntelliJ Plugin Verifier tool
# Requires build job to be passed
verify:
name: Verify
needs: build
runs-on: ubuntu-latest
steps:
- name: Setup Java
uses: actions/setup-java@v2
with:
java-version: 21
distribution: 'zulu'
- name: Fetch Sources
uses: actions/checkout@v2
# Run tests
- name: Run Tests
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: ./gradlew check
# Run verifyPlugin Gradle task
- name: Verify Plugin
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: ./gradlew verifyPlugin