Skip to content

Create ci.yml

Create ci.yml #16

Workflow file for this run

name: CI (Compile, Build, and Publish IntelliJ Plugin)
on:
push:
branches:
- "7.2.0"
pull_request:
branches:
- "7.2.0"
release:
types:
- created
jobs:
test:
name: Run Tests
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Set up JDK 11
uses: actions/setup-java@v3
with:
distribution: 'corretto'
java-version: '11'
- name: Grant execute permissions to Gradle wrapper
run: chmod +x ./gradlew
- name: Verify Gradle Version (Using Project's Wrapper)
run: ./gradlew --version
- name: Cleanup Before Build
run: rm -rf build/distributions/*
- name: Build Plugin
run: ./gradlew clean buildPlugin --refresh-dependencies --stacktrace --info
package:
name: Package & Upload Plugin
runs-on: ubuntu-latest
needs: test
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Set up JDK 11
uses: actions/setup-java@v3
with:
distribution: 'corretto'
java-version: '11'
- name: Grant execute permissions to Gradle wrapper
run: chmod +x ./gradlew
- name: Cleanup Before Build
run: rm -rf build/distributions/*
- name: Build Plugin
run: ./gradlew clean buildPlugin --refresh-dependencies --stacktrace --info
- name: Ensure output directory exists
run: mkdir -p build/distributions
- name: Extract Plugin Zip Before Upload
run: unzip -d build/distributions/extracted build/distributions/org.jboss.tools.mta-7.2.0.zip
- name: Upload Plugin Artifact (As Folder)
uses: actions/upload-artifact@v4
with:
name: org.jboss.tools.mta-7.2.0
path: build/distributions/extracted
if-no-files-found: error