Skip to content

Commit

Permalink
Create ci.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
hhpatel14 committed Feb 12, 2025
1 parent 2d12dbc commit 2163e61
Showing 1 changed file with 76 additions and 0 deletions.
76 changes: 76 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
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

0 comments on commit 2163e61

Please sign in to comment.