From 7197760bc46ab35f55571c6aed49823374216347 Mon Sep 17 00:00:00 2001 From: lalitKumarHCL <79622980+lalitKumarHCL@users.noreply.github.com> Date: Wed, 10 Nov 2021 03:27:25 +0530 Subject: [PATCH 01/19] Created maven.yml --- .github/workflows/maven.yml | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 .github/workflows/maven.yml diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml new file mode 100644 index 0000000..1502340 --- /dev/null +++ b/.github/workflows/maven.yml @@ -0,0 +1,26 @@ +# This workflow will build a Java project with Maven, and cache/restore any dependencies to improve the workflow execution time +# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven + +name: Java CI with Maven + +on: + push: + branches: [ main ] + pull_request: + branches: [ main ] + +jobs: + build: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + - name: Set up JDK 8 + uses: actions/setup-java@v2 + with: + java-version: '8' + distribution: 'adopt' + cache: maven + - name: Build with Maven + run: mvn -B package --file pom.xml From 9d49d2089b61ae909422a2e39a822ef5be2d2f74 Mon Sep 17 00:00:00 2001 From: lalitKumarHCL <79622980+lalitKumarHCL@users.noreply.github.com> Date: Wed, 10 Nov 2021 04:48:08 +0530 Subject: [PATCH 02/19] Upload Artifacts --- .github/workflows/maven.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml index 1502340..312a30c 100644 --- a/.github/workflows/maven.yml +++ b/.github/workflows/maven.yml @@ -11,9 +11,7 @@ on: jobs: build: - runs-on: ubuntu-latest - steps: - uses: actions/checkout@v2 - name: Set up JDK 8 @@ -24,3 +22,8 @@ jobs: cache: maven - name: Build with Maven run: mvn -B package --file pom.xml + - name: Upload Artifacts + uses: actions/upload-artifact@v2 + with: + name: hcl-accelerate + path: traget/hcl-accelerate.hpi From 7a8a639b3b99ad168f56daa39dda264baa30fbfa Mon Sep 17 00:00:00 2001 From: lalitKumarHCL <79622980+lalitKumarHCL@users.noreply.github.com> Date: Wed, 10 Nov 2021 04:54:30 +0530 Subject: [PATCH 03/19] path check --- .github/workflows/maven.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml index 312a30c..ac78bce 100644 --- a/.github/workflows/maven.yml +++ b/.github/workflows/maven.yml @@ -26,4 +26,4 @@ jobs: uses: actions/upload-artifact@v2 with: name: hcl-accelerate - path: traget/hcl-accelerate.hpi + path: /home/runner/work/hcl-accelerate-plugin/hcl-accelerate-plugin/target/hcl-accelerate.hpi From 4797a31dcdaeff70f1f6016c578d0685e029c4e2 Mon Sep 17 00:00:00 2001 From: lalitKumarHCL <79622980+lalitKumarHCL@users.noreply.github.com> Date: Wed, 10 Nov 2021 05:00:45 +0530 Subject: [PATCH 04/19] Update maven.yml --- .github/workflows/maven.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml index ac78bce..6605b67 100644 --- a/.github/workflows/maven.yml +++ b/.github/workflows/maven.yml @@ -25,5 +25,4 @@ jobs: - name: Upload Artifacts uses: actions/upload-artifact@v2 with: - name: hcl-accelerate path: /home/runner/work/hcl-accelerate-plugin/hcl-accelerate-plugin/target/hcl-accelerate.hpi From c36bec48946740ae7b8b7fb453674e5f8c3146f8 Mon Sep 17 00:00:00 2001 From: lalitKumarHCL <79622980+lalitKumarHCL@users.noreply.github.com> Date: Wed, 10 Nov 2021 05:36:18 +0530 Subject: [PATCH 05/19] create release --- .github/workflows/maven.yml | 31 ++++++++++++++++++++++++++++++- 1 file changed, 30 insertions(+), 1 deletion(-) diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml index 6605b67..8bd53e7 100644 --- a/.github/workflows/maven.yml +++ b/.github/workflows/maven.yml @@ -10,7 +10,8 @@ on: branches: [ main ] jobs: - build: + build-project: + name: Build Artifact runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 @@ -25,4 +26,32 @@ jobs: - name: Upload Artifacts uses: actions/upload-artifact@v2 with: + name: hcl-accelerate path: /home/runner/work/hcl-accelerate-plugin/hcl-accelerate-plugin/target/hcl-accelerate.hpi + release-project: + name: Release Artifact + runs-on: ubuntu-latest + needs: build-project + steps: + - name: Download site content + uses: actions/download-artifact@v2 + with: + name: hcl-accelerate + - name: Create GitHub release + id: create-new-release + uses: actions/create-release@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + tag_name: ${{ github.run_number }} + release_name: Release ${{ github.run_number }} + - name: Upload release asset + uses: actions/upload-release-asset@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + upload_url: ${{ steps.create-new-release.outputs.upload_url }} + asset_path: ./hcl-accelerate + asset_name: hcl-accelerate-v${{ github.run_number }}.zip + asset_content_type: application/zip + From 2f0d13ddc7f310ebf169369444ef0d2227482463 Mon Sep 17 00:00:00 2001 From: lalitKumarHCL <79622980+lalitKumarHCL@users.noreply.github.com> Date: Wed, 10 Nov 2021 05:38:40 +0530 Subject: [PATCH 06/19] Update maven.yml --- .github/workflows/maven.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml index 8bd53e7..2d3849a 100644 --- a/.github/workflows/maven.yml +++ b/.github/workflows/maven.yml @@ -51,7 +51,7 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: upload_url: ${{ steps.create-new-release.outputs.upload_url }} - asset_path: ./hcl-accelerate + asset_path: ./hcl-accelerate.zip asset_name: hcl-accelerate-v${{ github.run_number }}.zip asset_content_type: application/zip From d67d0ead69b6d3369c80c0817e5d67b43f75a11f Mon Sep 17 00:00:00 2001 From: lalitKumarHCL <79622980+lalitKumarHCL@users.noreply.github.com> Date: Wed, 10 Nov 2021 05:41:38 +0530 Subject: [PATCH 07/19] Update maven.yml --- .github/workflows/maven.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml index 2d3849a..917677a 100644 --- a/.github/workflows/maven.yml +++ b/.github/workflows/maven.yml @@ -45,6 +45,8 @@ jobs: with: tag_name: ${{ github.run_number }} release_name: Release ${{ github.run_number }} + - name: View content + run: ls -R - name: Upload release asset uses: actions/upload-release-asset@v1 env: From 5dd2b63a2c6bc45afa6296df6385e1ca35158c21 Mon Sep 17 00:00:00 2001 From: lalitKumarHCL <79622980+lalitKumarHCL@users.noreply.github.com> Date: Wed, 10 Nov 2021 05:45:45 +0530 Subject: [PATCH 08/19] Update maven.yml --- .github/workflows/maven.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml index 917677a..181688c 100644 --- a/.github/workflows/maven.yml +++ b/.github/workflows/maven.yml @@ -53,7 +53,7 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: upload_url: ${{ steps.create-new-release.outputs.upload_url }} - asset_path: ./hcl-accelerate.zip + asset_path: hcl-accelerate.hpi asset_name: hcl-accelerate-v${{ github.run_number }}.zip - asset_content_type: application/zip + asset_content_type: application/hpi From c81f1ec915e73a279ffecd5d28f4b6fcde8b7608 Mon Sep 17 00:00:00 2001 From: lalitKumarHCL <79622980+lalitKumarHCL@users.noreply.github.com> Date: Wed, 10 Nov 2021 05:53:54 +0530 Subject: [PATCH 09/19] Update maven.yml --- .github/workflows/maven.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml index 181688c..f187ca9 100644 --- a/.github/workflows/maven.yml +++ b/.github/workflows/maven.yml @@ -54,6 +54,4 @@ jobs: with: upload_url: ${{ steps.create-new-release.outputs.upload_url }} asset_path: hcl-accelerate.hpi - asset_name: hcl-accelerate-v${{ github.run_number }}.zip - asset_content_type: application/hpi - + asset_name: hcl-accelerate-v${{ github.run_number }}.hpi From 04247bdbd66c73899b738103b643378a4edd65ac Mon Sep 17 00:00:00 2001 From: lalitKumarHCL <79622980+lalitKumarHCL@users.noreply.github.com> Date: Wed, 10 Nov 2021 06:13:32 +0530 Subject: [PATCH 10/19] Update maven.yml --- .github/workflows/maven.yml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml index f187ca9..1239574 100644 --- a/.github/workflows/maven.yml +++ b/.github/workflows/maven.yml @@ -37,6 +37,10 @@ jobs: uses: actions/download-artifact@v2 with: name: hcl-accelerate + - name: Archive site content + uses: thedoctor0/zip-release@master + with: + filename: hcl-accelerate.zip - name: Create GitHub release id: create-new-release uses: actions/create-release@v1 @@ -53,5 +57,6 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: upload_url: ${{ steps.create-new-release.outputs.upload_url }} - asset_path: hcl-accelerate.hpi - asset_name: hcl-accelerate-v${{ github.run_number }}.hpi + asset_path: ./hcl-accelerate.zip + asset_name: hcl-accelerate-v${{ github.run_number }}.zip + asset_content_type: application/zip From 7c2d93344dce3f0705d6595a6296801874f390f6 Mon Sep 17 00:00:00 2001 From: lalitKumarHCL <79622980+lalitKumarHCL@users.noreply.github.com> Date: Wed, 10 Nov 2021 06:41:29 +0530 Subject: [PATCH 11/19] Update maven.yml --- .github/workflows/maven.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml index 1239574..104dd11 100644 --- a/.github/workflows/maven.yml +++ b/.github/workflows/maven.yml @@ -57,6 +57,6 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: upload_url: ${{ steps.create-new-release.outputs.upload_url }} - asset_path: ./hcl-accelerate.zip - asset_name: hcl-accelerate-v${{ github.run_number }}.zip + asset_path: hcl-accelerate.hpi + asset_name: hcl-accelerate-v${{ github.run_number }}.hpi asset_content_type: application/zip From 70536f8eba29d764ce51f60f1ea8824080ba8482 Mon Sep 17 00:00:00 2001 From: lalitKumarHCL <79622980+lalitKumarHCL@users.noreply.github.com> Date: Wed, 10 Nov 2021 06:56:52 +0530 Subject: [PATCH 12/19] Update maven.yml --- .github/workflows/maven.yml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml index 104dd11..e31ffee 100644 --- a/.github/workflows/maven.yml +++ b/.github/workflows/maven.yml @@ -28,6 +28,15 @@ jobs: with: name: hcl-accelerate path: /home/runner/work/hcl-accelerate-plugin/hcl-accelerate-plugin/target/hcl-accelerate.hpi + - name: Extract GAV + id: extract + uses: andreacomo/maven-gav-extractor@v1 + - name: Log GAV + run: | + echo ${{ steps.extract.outputs.group-id }} + echo ${{ steps.extract.outputs.artifact-id }} + echo ${{ steps.extract.outputs.version }} + shell: bash release-project: name: Release Artifact runs-on: ubuntu-latest From fc4a200f40a4c7fe317a240acf607c0f7e366a40 Mon Sep 17 00:00:00 2001 From: lalitKumarHCL <79622980+lalitKumarHCL@users.noreply.github.com> Date: Wed, 10 Nov 2021 07:06:23 +0530 Subject: [PATCH 13/19] Update maven.yml --- .github/workflows/maven.yml | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml index e31ffee..9ba080c 100644 --- a/.github/workflows/maven.yml +++ b/.github/workflows/maven.yml @@ -23,11 +23,6 @@ jobs: cache: maven - name: Build with Maven run: mvn -B package --file pom.xml - - name: Upload Artifacts - uses: actions/upload-artifact@v2 - with: - name: hcl-accelerate - path: /home/runner/work/hcl-accelerate-plugin/hcl-accelerate-plugin/target/hcl-accelerate.hpi - name: Extract GAV id: extract uses: andreacomo/maven-gav-extractor@v1 @@ -37,6 +32,11 @@ jobs: echo ${{ steps.extract.outputs.artifact-id }} echo ${{ steps.extract.outputs.version }} shell: bash + - name: ${{ steps.extract.outputs.artifact-id }}:${{ steps.extract.outputs.version }} + uses: actions/upload-artifact@v2 + with: + name: hcl-accelerate + path: /home/runner/work/hcl-accelerate-plugin/hcl-accelerate-plugin/target/hcl-accelerate.hpi release-project: name: Release Artifact runs-on: ubuntu-latest @@ -45,11 +45,7 @@ jobs: - name: Download site content uses: actions/download-artifact@v2 with: - name: hcl-accelerate - - name: Archive site content - uses: thedoctor0/zip-release@master - with: - filename: hcl-accelerate.zip + name: ${{ steps.extract.outputs.artifact-id }}:${{ steps.extract.outputs.version }} - name: Create GitHub release id: create-new-release uses: actions/create-release@v1 @@ -66,6 +62,6 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: upload_url: ${{ steps.create-new-release.outputs.upload_url }} - asset_path: hcl-accelerate.hpi - asset_name: hcl-accelerate-v${{ github.run_number }}.hpi + asset_path: ${{ steps.extract.outputs.artifact-id }}:${{ steps.extract.outputs.version }}.hpi + asset_name: ${{ steps.extract.outputs.artifact-id }}:${{ steps.extract.outputs.version }}.hpi asset_content_type: application/zip From 7889913a41562acb99348428d315e5431784153e Mon Sep 17 00:00:00 2001 From: lalitKumarHCL <79622980+lalitKumarHCL@users.noreply.github.com> Date: Wed, 10 Nov 2021 07:12:07 +0530 Subject: [PATCH 14/19] Update maven.yml --- .github/workflows/maven.yml | 52 +++++++++++++++++-------------------- 1 file changed, 24 insertions(+), 28 deletions(-) diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml index 9ba080c..5650bfa 100644 --- a/.github/workflows/maven.yml +++ b/.github/workflows/maven.yml @@ -37,31 +37,27 @@ jobs: with: name: hcl-accelerate path: /home/runner/work/hcl-accelerate-plugin/hcl-accelerate-plugin/target/hcl-accelerate.hpi - release-project: - name: Release Artifact - runs-on: ubuntu-latest - needs: build-project - steps: - - name: Download site content - uses: actions/download-artifact@v2 - with: - name: ${{ steps.extract.outputs.artifact-id }}:${{ steps.extract.outputs.version }} - - name: Create GitHub release - id: create-new-release - uses: actions/create-release@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - tag_name: ${{ github.run_number }} - release_name: Release ${{ github.run_number }} - - name: View content - run: ls -R - - name: Upload release asset - uses: actions/upload-release-asset@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - upload_url: ${{ steps.create-new-release.outputs.upload_url }} - asset_path: ${{ steps.extract.outputs.artifact-id }}:${{ steps.extract.outputs.version }}.hpi - asset_name: ${{ steps.extract.outputs.artifact-id }}:${{ steps.extract.outputs.version }}.hpi - asset_content_type: application/zip + + - name: Download site content + uses: actions/download-artifact@v2 + with: + name: ${{ steps.extract.outputs.artifact-id }}:${{ steps.extract.outputs.version }} + - name: Create GitHub release + id: create-new-release + uses: actions/create-release@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + tag_name: ${{ github.run_number }} + release_name: Release ${{ github.run_number }} + - name: View content + run: ls -R + - name: Upload release asset + uses: actions/upload-release-asset@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + upload_url: ${{ steps.create-new-release.outputs.upload_url }} + asset_path: ${{ steps.extract.outputs.artifact-id }}:${{ steps.extract.outputs.version }}.hpi + asset_name: ${{ steps.extract.outputs.artifact-id }}:${{ steps.extract.outputs.version }}.hpi + asset_content_type: application/zip From aba7a5bd4e7200d1b10436e723ba5c9f1f94c399 Mon Sep 17 00:00:00 2001 From: lalitKumarHCL <79622980+lalitKumarHCL@users.noreply.github.com> Date: Wed, 10 Nov 2021 07:18:14 +0530 Subject: [PATCH 15/19] Update maven.yml --- .github/workflows/maven.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml index 5650bfa..e192895 100644 --- a/.github/workflows/maven.yml +++ b/.github/workflows/maven.yml @@ -35,7 +35,7 @@ jobs: - name: ${{ steps.extract.outputs.artifact-id }}:${{ steps.extract.outputs.version }} uses: actions/upload-artifact@v2 with: - name: hcl-accelerate + name: ${{ steps.extract.outputs.artifact-id }}:${{ steps.extract.outputs.version }} path: /home/runner/work/hcl-accelerate-plugin/hcl-accelerate-plugin/target/hcl-accelerate.hpi - name: Download site content From c3969aa1e89a855029e60bce68388ee2013eda6b Mon Sep 17 00:00:00 2001 From: lalitKumarHCL <79622980+lalitKumarHCL@users.noreply.github.com> Date: Wed, 10 Nov 2021 07:22:16 +0530 Subject: [PATCH 16/19] Update maven.yml --- .github/workflows/maven.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml index e192895..af86781 100644 --- a/.github/workflows/maven.yml +++ b/.github/workflows/maven.yml @@ -32,16 +32,16 @@ jobs: echo ${{ steps.extract.outputs.artifact-id }} echo ${{ steps.extract.outputs.version }} shell: bash - - name: ${{ steps.extract.outputs.artifact-id }}:${{ steps.extract.outputs.version }} + - name: ${{ steps.extract.outputs.artifact-id }}-${{ steps.extract.outputs.version }} uses: actions/upload-artifact@v2 with: - name: ${{ steps.extract.outputs.artifact-id }}:${{ steps.extract.outputs.version }} + name: ${{ steps.extract.outputs.artifact-id }}-${{ steps.extract.outputs.version }} path: /home/runner/work/hcl-accelerate-plugin/hcl-accelerate-plugin/target/hcl-accelerate.hpi - name: Download site content uses: actions/download-artifact@v2 with: - name: ${{ steps.extract.outputs.artifact-id }}:${{ steps.extract.outputs.version }} + name: ${{ steps.extract.outputs.artifact-id }}-${{ steps.extract.outputs.version }} - name: Create GitHub release id: create-new-release uses: actions/create-release@v1 @@ -58,6 +58,6 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: upload_url: ${{ steps.create-new-release.outputs.upload_url }} - asset_path: ${{ steps.extract.outputs.artifact-id }}:${{ steps.extract.outputs.version }}.hpi - asset_name: ${{ steps.extract.outputs.artifact-id }}:${{ steps.extract.outputs.version }}.hpi + asset_path: ${{ steps.extract.outputs.artifact-id }}-${{ steps.extract.outputs.version }}.hpi + asset_name: ${{ steps.extract.outputs.artifact-id }}-${{ steps.extract.outputs.version }}.hpi asset_content_type: application/zip From 8e8b1b112d8c14c4ae5844cab8ed4bf982d943f1 Mon Sep 17 00:00:00 2001 From: lalitKumarHCL <79622980+lalitKumarHCL@users.noreply.github.com> Date: Wed, 10 Nov 2021 07:32:34 +0530 Subject: [PATCH 17/19] Update maven.yml --- .github/workflows/maven.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml index af86781..85245ff 100644 --- a/.github/workflows/maven.yml +++ b/.github/workflows/maven.yml @@ -58,6 +58,6 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: upload_url: ${{ steps.create-new-release.outputs.upload_url }} - asset_path: ${{ steps.extract.outputs.artifact-id }}-${{ steps.extract.outputs.version }}.hpi + asset_path: /home/runner/work/hcl-accelerate-plugin/hcl-accelerate-plugin/target/hcl-accelerate.hpi asset_name: ${{ steps.extract.outputs.artifact-id }}-${{ steps.extract.outputs.version }}.hpi asset_content_type: application/zip From a470d7911610066266741187e96daae4cb4c640b Mon Sep 17 00:00:00 2001 From: lalitKumarHCL <79622980+lalitKumarHCL@users.noreply.github.com> Date: Wed, 10 Nov 2021 07:39:13 +0530 Subject: [PATCH 18/19] Update maven.yml --- .github/workflows/maven.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml index 85245ff..873e939 100644 --- a/.github/workflows/maven.yml +++ b/.github/workflows/maven.yml @@ -1,7 +1,7 @@ # This workflow will build a Java project with Maven, and cache/restore any dependencies to improve the workflow execution time # For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven -name: Java CI with Maven +name: Maven Build and Release Artifact on: push: @@ -48,8 +48,8 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: - tag_name: ${{ github.run_number }} - release_name: Release ${{ github.run_number }} + tag_name: ${{ steps.extract.outputs.version }} + release_name: ${{ steps.extract.outputs.artifact-id }}-${{ steps.extract.outputs.version }} - name: View content run: ls -R - name: Upload release asset From c24552bfe3b20db7c2ae28e08504ac32d1d4424e Mon Sep 17 00:00:00 2001 From: Lalit Kumar Date: Wed, 10 Nov 2021 07:51:45 +0530 Subject: [PATCH 19/19] Final --- .../workflows/{maven.yml => mvnMainMerge.yml} | 6 +-- .github/workflows/mvnPRCreated.yml | 37 +++++++++++++++++++ pom.xml | 2 +- 3 files changed, 40 insertions(+), 5 deletions(-) rename .github/workflows/{maven.yml => mvnMainMerge.yml} (92%) create mode 100644 .github/workflows/mvnPRCreated.yml diff --git a/.github/workflows/maven.yml b/.github/workflows/mvnMainMerge.yml similarity index 92% rename from .github/workflows/maven.yml rename to .github/workflows/mvnMainMerge.yml index 873e939..eea586f 100644 --- a/.github/workflows/maven.yml +++ b/.github/workflows/mvnMainMerge.yml @@ -1,13 +1,11 @@ # This workflow will build a Java project with Maven, and cache/restore any dependencies to improve the workflow execution time # For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven -name: Maven Build and Release Artifact +name: Maven Main Build and Release Artifact on: push: branches: [ main ] - pull_request: - branches: [ main ] jobs: build-project: @@ -32,7 +30,7 @@ jobs: echo ${{ steps.extract.outputs.artifact-id }} echo ${{ steps.extract.outputs.version }} shell: bash - - name: ${{ steps.extract.outputs.artifact-id }}-${{ steps.extract.outputs.version }} + - name: Upload Build Artifact uses: actions/upload-artifact@v2 with: name: ${{ steps.extract.outputs.artifact-id }}-${{ steps.extract.outputs.version }} diff --git a/.github/workflows/mvnPRCreated.yml b/.github/workflows/mvnPRCreated.yml new file mode 100644 index 0000000..b4e3793 --- /dev/null +++ b/.github/workflows/mvnPRCreated.yml @@ -0,0 +1,37 @@ +# This workflow will build a Java project with Maven, and cache/restore any dependencies to improve the workflow execution time +# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven + +name: Maven Pull Request Build + +on: + pull_request: + branches: [ main ] + +jobs: + build-project: + name: Build Artifact + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Set up JDK 8 + uses: actions/setup-java@v2 + with: + java-version: '8' + distribution: 'adopt' + cache: maven + - name: Build with Maven + run: mvn -B package --file pom.xml + - name: Extract GAV + id: extract + uses: andreacomo/maven-gav-extractor@v1 + - name: Log GAV + run: | + echo ${{ steps.extract.outputs.group-id }} + echo ${{ steps.extract.outputs.artifact-id }} + echo ${{ steps.extract.outputs.version }} + shell: bash + - name: Upload Build Artifact + uses: actions/upload-artifact@v2 + with: + name: ${{ steps.extract.outputs.artifact-id }}-${{ steps.extract.outputs.version }} + path: /home/runner/work/hcl-accelerate-plugin/hcl-accelerate-plugin/target/hcl-accelerate.hpi \ No newline at end of file diff --git a/pom.xml b/pom.xml index 50055f5..96b7d5a 100644 --- a/pom.xml +++ b/pom.xml @@ -15,7 +15,7 @@ 4.0.0 com.hcl.devops hcl-accelerate - 2.1.4-SNAPSHOT + 2.1.4 hpi HCL Accelerate Plugin This plugin can run Jenkins jobs as a part of a deployment plan in HCL Accelerate.