forked from windup/intellij-mta
-
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.
- Loading branch information
Showing
1 changed file
with
76 additions
and
0 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 |
---|---|---|
@@ -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 |