From b644f286e9e5a9079687db969a329924c951f6c5 Mon Sep 17 00:00:00 2001 From: beanbeanjuice Date: Wed, 28 Feb 2024 12:22:15 -0800 Subject: [PATCH] Created New Workflow --- .github/workflows/codeql-gradle-workflow.yml | 12 ++--- .github/workflows/gradle-publish.workflow.yml | 44 +++++++++++++++++++ 2 files changed, 48 insertions(+), 8 deletions(-) create mode 100644 .github/workflows/gradle-publish.workflow.yml diff --git a/.github/workflows/codeql-gradle-workflow.yml b/.github/workflows/codeql-gradle-workflow.yml index a25b8d6..30a5aec 100644 --- a/.github/workflows/codeql-gradle-workflow.yml +++ b/.github/workflows/codeql-gradle-workflow.yml @@ -1,4 +1,4 @@ -name: "CodeQL and Gradle CI" +name: "Gradle CI" on: push: @@ -8,10 +8,11 @@ on: pull_request: branches: - integration + - master jobs: - analyze: - name: Analyze + test: + name: Test runs-on: ubuntu-latest permissions: actions: read @@ -47,8 +48,3 @@ jobs: - name: Build and Test with Gradle run: ./gradlew test - - - name: Upload JAR to HANGAR - env: - HANGAR_TOKEN: ${{ secrets.HANGAR_API_TOKEN }} - run: ./gradlew build publishPluginPublicationToHangar --stacktrace diff --git a/.github/workflows/gradle-publish.workflow.yml b/.github/workflows/gradle-publish.workflow.yml new file mode 100644 index 0000000..b9fd7d2 --- /dev/null +++ b/.github/workflows/gradle-publish.workflow.yml @@ -0,0 +1,44 @@ +name: "Gradle Publish" + +on: + push: + branches: + - master + - integration + +jobs: + publish: + name: Publish + runs-on: ubuntu-latest + permissions: + actions: read + contents: read + security-events: write + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Validate Gradle Wrapper + uses: gradle/wrapper-validation-action@v1 + + - name: Set up JDK 17 + uses: actions/setup-java@v4 + with: + java-version: '17' + distribution: 'oracle' + cache: gradle + + - name: Setup Gradle + uses: gradle/actions/setup-gradle@v3 + + - name: Change gradlew Permissions + run: chmod u+rwx gradlew + + - name: Build and Test with Gradle + run: ./gradlew test + + - name: Upload JAR to HANGAR + env: + HANGAR_API_TOKEN: ${{ secrets.HANGAR_API_TOKEN }} + run: ./gradlew build publishPluginPublicationToHangar --stacktrace