From 962ae6f7b84a5932d2ea8016aeb5ea564852293b Mon Sep 17 00:00:00 2001 From: Sumit Morchhale Date: Fri, 18 Jul 2025 15:18:29 +0530 Subject: [PATCH 01/11] check the wrapper has latest cli version --- .github/workflows/release.yml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 8201c4a3..f070b5ef 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -102,6 +102,20 @@ jobs: echo "CLI_VERSION=$CLI_VERSION" >> $GITHUB_ENV echo "::set-output name=CLI_VERSION::$CLI_VERSION" + - name: Check if CLI version is latest + id: check_latest_cli_version + run: | + LATEST_CLI_VERSION=$(curl -s https://github.com/Checkmarx/ast-cli/releases/latest | grep -oP 'tag/\K[0-9]+\.[0-9]+\.[0-9]+') + echo "CLI_VERSION=[$CLI_VERSION]" + echo "LATEST_CLI_VERSION=[$LATEST_CLI_VERSION]" + echo "Latest CLI version from GitHub: $LATEST_CLI_VERSION" + if [ "$CLI_VERSION" = "$LATEST_CLI_VERSION" ]; then + echo "CLI_VERSION ($CLI_VERSION) matches the latest released version ($LATEST_CLI_VERSION). Proceeding." + else + echo "CLI_VERSION ($CLI_VERSION) does not match the latest released version ($LATEST_CLI_VERSION). Failing workflow." + exit 1 + fi + - name: Publish package run: mvn --batch-mode deploy -DskipTests ${{ env.AID_PROP }} env: From 270ba6a10921dbae857876bb04ccb46812a00168 Mon Sep 17 00:00:00 2001 From: Sumit Morchhale Date: Mon, 21 Jul 2025 14:58:01 +0530 Subject: [PATCH 02/11] Replace grep --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index f070b5ef..30ac01ee 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -105,7 +105,7 @@ jobs: - name: Check if CLI version is latest id: check_latest_cli_version run: | - LATEST_CLI_VERSION=$(curl -s https://github.com/Checkmarx/ast-cli/releases/latest | grep -oP 'tag/\K[0-9]+\.[0-9]+\.[0-9]+') + LATEST_CLI_VERSION=$(curl -s https://api.github.com/repos/Checkmarx/ast-cli/releases/latest | grep '"tag_name":' | sed -E 's/.*"([^"]+)".*/\1/') echo "CLI_VERSION=[$CLI_VERSION]" echo "LATEST_CLI_VERSION=[$LATEST_CLI_VERSION]" echo "Latest CLI version from GitHub: $LATEST_CLI_VERSION" From a7cf3b9b999f46c8b8a41f3de1e3307c3d6089b4 Mon Sep 17 00:00:00 2001 From: Sumit Morchhale Date: Mon, 21 Jul 2025 15:02:03 +0530 Subject: [PATCH 03/11] latest version is not fetching --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 30ac01ee..088dad97 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -105,7 +105,7 @@ jobs: - name: Check if CLI version is latest id: check_latest_cli_version run: | - LATEST_CLI_VERSION=$(curl -s https://api.github.com/repos/Checkmarx/ast-cli/releases/latest | grep '"tag_name":' | sed -E 's/.*"([^"]+)".*/\1/') + LATEST_CLI_VERSION=$(curl -s https://api.github.com/repos/Checkmarx/ast-cli/releases/latest | grep '"tag":' | sed -E 's/.*"([^"]+)".*/\1/') echo "CLI_VERSION=[$CLI_VERSION]" echo "LATEST_CLI_VERSION=[$LATEST_CLI_VERSION]" echo "Latest CLI version from GitHub: $LATEST_CLI_VERSION" From ede146a10828c0f0bb8d484edbfed09761256c15 Mon Sep 17 00:00:00 2001 From: Sumit Morchhale Date: Mon, 21 Jul 2025 15:13:46 +0530 Subject: [PATCH 04/11] Updated the grep cmd --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 088dad97..30ac01ee 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -105,7 +105,7 @@ jobs: - name: Check if CLI version is latest id: check_latest_cli_version run: | - LATEST_CLI_VERSION=$(curl -s https://api.github.com/repos/Checkmarx/ast-cli/releases/latest | grep '"tag":' | sed -E 's/.*"([^"]+)".*/\1/') + LATEST_CLI_VERSION=$(curl -s https://api.github.com/repos/Checkmarx/ast-cli/releases/latest | grep '"tag_name":' | sed -E 's/.*"([^"]+)".*/\1/') echo "CLI_VERSION=[$CLI_VERSION]" echo "LATEST_CLI_VERSION=[$LATEST_CLI_VERSION]" echo "Latest CLI version from GitHub: $LATEST_CLI_VERSION" From 304f19e0720cb77f4176ee028eb03ac5eaf0708b Mon Sep 17 00:00:00 2001 From: Sumit Morchhale Date: Tue, 22 Jul 2025 14:28:12 +0530 Subject: [PATCH 05/11] check cli version only when it is not dev build --- .github/workflows/release.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 30ac01ee..297c3950 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -103,6 +103,7 @@ jobs: echo "::set-output name=CLI_VERSION::$CLI_VERSION" - name: Check if CLI version is latest + if: ${{ github.event.inputs.dev == 'false' }} id: check_latest_cli_version run: | LATEST_CLI_VERSION=$(curl -s https://api.github.com/repos/Checkmarx/ast-cli/releases/latest | grep '"tag_name":' | sed -E 's/.*"([^"]+)".*/\1/') From 8d55a4740a88b5036939cd31606ca1577490e99a Mon Sep 17 00:00:00 2001 From: Sumit Morchhale Date: Tue, 22 Jul 2025 14:39:19 +0530 Subject: [PATCH 06/11] added check cli version on top --- .github/workflows/release.yml | 46 +++++++++++++++++------------------ 1 file changed, 23 insertions(+), 23 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 297c3950..08567b3c 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -51,6 +51,29 @@ jobs: chmod +x ./.github/scripts/update_cli.sh ./.github/scripts/update_cli.sh ${{ inputs.cliTag }} + - name: Extract CLI version + id: extract_cli_version + run: | + CLI_VERSION=$(./src/main/resources/cx-linux version | grep -Eo '^[0-9]+\.[0-9]+\.[0-9]+') + echo "CLI version being packed is $CLI_VERSION" + echo "CLI_VERSION=$CLI_VERSION" >> $GITHUB_ENV + echo "::set-output name=CLI_VERSION::$CLI_VERSION" + + - name: Check if CLI version is latest + if: ${{ github.event.inputs.dev == 'false' }} + id: check_latest_cli_version + run: | + LATEST_CLI_VERSION=$(curl -s https://api.github.com/repos/Checkmarx/ast-cli/releases/latest | grep '"tag_name":' | sed -E 's/.*"([^"]+)".*/\1/') + echo "CLI_VERSION=[$CLI_VERSION]" + echo "LATEST_CLI_VERSION=[$LATEST_CLI_VERSION]" + echo "Latest CLI version from GitHub: $LATEST_CLI_VERSION" + if [ "$CLI_VERSION" = "$LATEST_CLI_VERSION" ]; then + echo "CLI_VERSION ($CLI_VERSION) matches the latest released version ($LATEST_CLI_VERSION). Proceeding." + else + echo "CLI_VERSION ($CLI_VERSION) does not match the latest released version ($LATEST_CLI_VERSION). Failing workflow." + exit 1 + fi + - name: Tag id: set_tag_name run: | @@ -94,29 +117,6 @@ jobs: fi echo "AID_PROP=${prop}" >> $GITHUB_ENV - - name: Extract CLI version - id: extract_cli_version - run: | - CLI_VERSION=$(./src/main/resources/cx-linux version | grep -Eo '^[0-9]+\.[0-9]+\.[0-9]+') - echo "CLI version being packed is $CLI_VERSION" - echo "CLI_VERSION=$CLI_VERSION" >> $GITHUB_ENV - echo "::set-output name=CLI_VERSION::$CLI_VERSION" - - - name: Check if CLI version is latest - if: ${{ github.event.inputs.dev == 'false' }} - id: check_latest_cli_version - run: | - LATEST_CLI_VERSION=$(curl -s https://api.github.com/repos/Checkmarx/ast-cli/releases/latest | grep '"tag_name":' | sed -E 's/.*"([^"]+)".*/\1/') - echo "CLI_VERSION=[$CLI_VERSION]" - echo "LATEST_CLI_VERSION=[$LATEST_CLI_VERSION]" - echo "Latest CLI version from GitHub: $LATEST_CLI_VERSION" - if [ "$CLI_VERSION" = "$LATEST_CLI_VERSION" ]; then - echo "CLI_VERSION ($CLI_VERSION) matches the latest released version ($LATEST_CLI_VERSION). Proceeding." - else - echo "CLI_VERSION ($CLI_VERSION) does not match the latest released version ($LATEST_CLI_VERSION). Failing workflow." - exit 1 - fi - - name: Publish package run: mvn --batch-mode deploy -DskipTests ${{ env.AID_PROP }} env: From 146fcf1e180a04be787fdb55eb95dbbb944d0337 Mon Sep 17 00:00:00 2001 From: Sumit Morchhale Date: Tue, 22 Jul 2025 14:44:03 +0530 Subject: [PATCH 07/11] comment steps for test --- .github/workflows/release.yml | 74 +++++++++++++++++------------------ 1 file changed, 37 insertions(+), 37 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 08567b3c..00a5e375 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -117,40 +117,40 @@ jobs: fi echo "AID_PROP=${prop}" >> $GITHUB_ENV - - name: Publish package - run: mvn --batch-mode deploy -DskipTests ${{ env.AID_PROP }} - env: - MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }} - MAVEN_PASSWORD: ${{ secrets.OSSRH_TOKEN }} - MAVEN_GPG_PASSPHRASE: ${{ secrets.MAVEN_GPG_PASSPHRASE }} - - - name: Release - uses: softprops/action-gh-release@a6c7483a42ee9d5daced968f6c217562cd680f7f #v2 - with: - generate_release_notes: true - tag_name: ${{ inputs.tag }} - prerelease: ${{ inputs.dev }} - - notify: - if: inputs.dev == false - needs: release - uses: Checkmarx/plugins-release-workflow/.github/workflows/release-notify.yml@main - with: - product_name: Java Wrapper - release_version: ${{ needs.release.outputs.TAG_NAME }} - cli_release_version: ${{ needs.release.outputs.CLI_VERSION }} - release_author: "Phoenix Team" - release_url: https://github.com/CheckmarxDev/ast-cli-java-wrapper/releases/tag/${{ needs.release.outputs.TAG_NAME }} - jira_product_name: JAVA_WRAPPER - secrets: inherit - - dispatch_auto_release: - name: Update Jenkins/Jetbrains/Eclipse Extensions With new Wrapper Version - if: inputs.dev == false - needs: notify - uses: Checkmarx/plugins-release-workflow/.github/workflows/dispatch-workflow.yml@main - with: - cli_version: ${{ needs.release.outputs.CLI_VERSION }} - is_cli_release: false - is_java_release: true - secrets: inherit \ No newline at end of file +# - name: Publish package +# run: mvn --batch-mode deploy -DskipTests ${{ env.AID_PROP }} +# env: +# MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }} +# MAVEN_PASSWORD: ${{ secrets.OSSRH_TOKEN }} +# MAVEN_GPG_PASSPHRASE: ${{ secrets.MAVEN_GPG_PASSPHRASE }} +# +# - name: Release +# uses: softprops/action-gh-release@a6c7483a42ee9d5daced968f6c217562cd680f7f #v2 +# with: +# generate_release_notes: true +# tag_name: ${{ inputs.tag }} +# prerelease: ${{ inputs.dev }} +# +# notify: +# if: inputs.dev == false +# needs: release +# uses: Checkmarx/plugins-release-workflow/.github/workflows/release-notify.yml@main +# with: +# product_name: Java Wrapper +# release_version: ${{ needs.release.outputs.TAG_NAME }} +# cli_release_version: ${{ needs.release.outputs.CLI_VERSION }} +# release_author: "Phoenix Team" +# release_url: https://github.com/CheckmarxDev/ast-cli-java-wrapper/releases/tag/${{ needs.release.outputs.TAG_NAME }} +# jira_product_name: JAVA_WRAPPER +# secrets: inherit +# +# dispatch_auto_release: +# name: Update Jenkins/Jetbrains/Eclipse Extensions With new Wrapper Version +# if: inputs.dev == false +# needs: notify +# uses: Checkmarx/plugins-release-workflow/.github/workflows/dispatch-workflow.yml@main +# with: +# cli_version: ${{ needs.release.outputs.CLI_VERSION }} +# is_cli_release: false +# is_java_release: true +# secrets: inherit \ No newline at end of file From 5c10fbe8375935092e13e2093a3943c659068478 Mon Sep 17 00:00:00 2001 From: Sumit Morchhale Date: Tue, 22 Jul 2025 15:01:24 +0530 Subject: [PATCH 08/11] uncomment the steps --- .github/workflows/release.yml | 74 +++++++++++++++++------------------ 1 file changed, 37 insertions(+), 37 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 00a5e375..08567b3c 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -117,40 +117,40 @@ jobs: fi echo "AID_PROP=${prop}" >> $GITHUB_ENV -# - name: Publish package -# run: mvn --batch-mode deploy -DskipTests ${{ env.AID_PROP }} -# env: -# MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }} -# MAVEN_PASSWORD: ${{ secrets.OSSRH_TOKEN }} -# MAVEN_GPG_PASSPHRASE: ${{ secrets.MAVEN_GPG_PASSPHRASE }} -# -# - name: Release -# uses: softprops/action-gh-release@a6c7483a42ee9d5daced968f6c217562cd680f7f #v2 -# with: -# generate_release_notes: true -# tag_name: ${{ inputs.tag }} -# prerelease: ${{ inputs.dev }} -# -# notify: -# if: inputs.dev == false -# needs: release -# uses: Checkmarx/plugins-release-workflow/.github/workflows/release-notify.yml@main -# with: -# product_name: Java Wrapper -# release_version: ${{ needs.release.outputs.TAG_NAME }} -# cli_release_version: ${{ needs.release.outputs.CLI_VERSION }} -# release_author: "Phoenix Team" -# release_url: https://github.com/CheckmarxDev/ast-cli-java-wrapper/releases/tag/${{ needs.release.outputs.TAG_NAME }} -# jira_product_name: JAVA_WRAPPER -# secrets: inherit -# -# dispatch_auto_release: -# name: Update Jenkins/Jetbrains/Eclipse Extensions With new Wrapper Version -# if: inputs.dev == false -# needs: notify -# uses: Checkmarx/plugins-release-workflow/.github/workflows/dispatch-workflow.yml@main -# with: -# cli_version: ${{ needs.release.outputs.CLI_VERSION }} -# is_cli_release: false -# is_java_release: true -# secrets: inherit \ No newline at end of file + - name: Publish package + run: mvn --batch-mode deploy -DskipTests ${{ env.AID_PROP }} + env: + MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }} + MAVEN_PASSWORD: ${{ secrets.OSSRH_TOKEN }} + MAVEN_GPG_PASSPHRASE: ${{ secrets.MAVEN_GPG_PASSPHRASE }} + + - name: Release + uses: softprops/action-gh-release@a6c7483a42ee9d5daced968f6c217562cd680f7f #v2 + with: + generate_release_notes: true + tag_name: ${{ inputs.tag }} + prerelease: ${{ inputs.dev }} + + notify: + if: inputs.dev == false + needs: release + uses: Checkmarx/plugins-release-workflow/.github/workflows/release-notify.yml@main + with: + product_name: Java Wrapper + release_version: ${{ needs.release.outputs.TAG_NAME }} + cli_release_version: ${{ needs.release.outputs.CLI_VERSION }} + release_author: "Phoenix Team" + release_url: https://github.com/CheckmarxDev/ast-cli-java-wrapper/releases/tag/${{ needs.release.outputs.TAG_NAME }} + jira_product_name: JAVA_WRAPPER + secrets: inherit + + dispatch_auto_release: + name: Update Jenkins/Jetbrains/Eclipse Extensions With new Wrapper Version + if: inputs.dev == false + needs: notify + uses: Checkmarx/plugins-release-workflow/.github/workflows/dispatch-workflow.yml@main + with: + cli_version: ${{ needs.release.outputs.CLI_VERSION }} + is_cli_release: false + is_java_release: true + secrets: inherit \ No newline at end of file From 21488e0714e54132db0e7ef03428e6db11c3a739 Mon Sep 17 00:00:00 2001 From: Sumit Morchhale Date: Tue, 22 Jul 2025 15:21:38 +0530 Subject: [PATCH 09/11] check cli version only when not dev or cli tag empty --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 08567b3c..44f31d1d 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -60,7 +60,7 @@ jobs: echo "::set-output name=CLI_VERSION::$CLI_VERSION" - name: Check if CLI version is latest - if: ${{ github.event.inputs.dev == 'false' }} + if: ${{ github.event.inputs.dev == 'false' && !github.event.inputs.cliTag && github.ref == 'refs/heads/main' }} id: check_latest_cli_version run: | LATEST_CLI_VERSION=$(curl -s https://api.github.com/repos/Checkmarx/ast-cli/releases/latest | grep '"tag_name":' | sed -E 's/.*"([^"]+)".*/\1/') From e9eab88a101536f3d9ca60636c43de95a1d3d18e Mon Sep 17 00:00:00 2001 From: Sumit Morchhale Date: Tue, 22 Jul 2025 15:48:08 +0530 Subject: [PATCH 10/11] comment steps for testing --- .github/workflows/release.yml | 74 +++++++++++++++++------------------ 1 file changed, 37 insertions(+), 37 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 44f31d1d..fb09a778 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -117,40 +117,40 @@ jobs: fi echo "AID_PROP=${prop}" >> $GITHUB_ENV - - name: Publish package - run: mvn --batch-mode deploy -DskipTests ${{ env.AID_PROP }} - env: - MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }} - MAVEN_PASSWORD: ${{ secrets.OSSRH_TOKEN }} - MAVEN_GPG_PASSPHRASE: ${{ secrets.MAVEN_GPG_PASSPHRASE }} - - - name: Release - uses: softprops/action-gh-release@a6c7483a42ee9d5daced968f6c217562cd680f7f #v2 - with: - generate_release_notes: true - tag_name: ${{ inputs.tag }} - prerelease: ${{ inputs.dev }} - - notify: - if: inputs.dev == false - needs: release - uses: Checkmarx/plugins-release-workflow/.github/workflows/release-notify.yml@main - with: - product_name: Java Wrapper - release_version: ${{ needs.release.outputs.TAG_NAME }} - cli_release_version: ${{ needs.release.outputs.CLI_VERSION }} - release_author: "Phoenix Team" - release_url: https://github.com/CheckmarxDev/ast-cli-java-wrapper/releases/tag/${{ needs.release.outputs.TAG_NAME }} - jira_product_name: JAVA_WRAPPER - secrets: inherit - - dispatch_auto_release: - name: Update Jenkins/Jetbrains/Eclipse Extensions With new Wrapper Version - if: inputs.dev == false - needs: notify - uses: Checkmarx/plugins-release-workflow/.github/workflows/dispatch-workflow.yml@main - with: - cli_version: ${{ needs.release.outputs.CLI_VERSION }} - is_cli_release: false - is_java_release: true - secrets: inherit \ No newline at end of file +# - name: Publish package +# run: mvn --batch-mode deploy -DskipTests ${{ env.AID_PROP }} +# env: +# MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }} +# MAVEN_PASSWORD: ${{ secrets.OSSRH_TOKEN }} +# MAVEN_GPG_PASSPHRASE: ${{ secrets.MAVEN_GPG_PASSPHRASE }} +# +# - name: Release +# uses: softprops/action-gh-release@a6c7483a42ee9d5daced968f6c217562cd680f7f #v2 +# with: +# generate_release_notes: true +# tag_name: ${{ inputs.tag }} +# prerelease: ${{ inputs.dev }} +# +# notify: +# if: inputs.dev == false +# needs: release +# uses: Checkmarx/plugins-release-workflow/.github/workflows/release-notify.yml@main +# with: +# product_name: Java Wrapper +# release_version: ${{ needs.release.outputs.TAG_NAME }} +# cli_release_version: ${{ needs.release.outputs.CLI_VERSION }} +# release_author: "Phoenix Team" +# release_url: https://github.com/CheckmarxDev/ast-cli-java-wrapper/releases/tag/${{ needs.release.outputs.TAG_NAME }} +# jira_product_name: JAVA_WRAPPER +# secrets: inherit +# +# dispatch_auto_release: +# name: Update Jenkins/Jetbrains/Eclipse Extensions With new Wrapper Version +# if: inputs.dev == false +# needs: notify +# uses: Checkmarx/plugins-release-workflow/.github/workflows/dispatch-workflow.yml@main +# with: +# cli_version: ${{ needs.release.outputs.CLI_VERSION }} +# is_cli_release: false +# is_java_release: true +# secrets: inherit \ No newline at end of file From 0549346d465f1c81e87c605412949d0dc0c3d3d4 Mon Sep 17 00:00:00 2001 From: Sumit Morchhale Date: Tue, 22 Jul 2025 15:52:57 +0530 Subject: [PATCH 11/11] un comment steps --- .github/workflows/release.yml | 74 +++++++++++++++++------------------ 1 file changed, 37 insertions(+), 37 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index fb09a778..44f31d1d 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -117,40 +117,40 @@ jobs: fi echo "AID_PROP=${prop}" >> $GITHUB_ENV -# - name: Publish package -# run: mvn --batch-mode deploy -DskipTests ${{ env.AID_PROP }} -# env: -# MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }} -# MAVEN_PASSWORD: ${{ secrets.OSSRH_TOKEN }} -# MAVEN_GPG_PASSPHRASE: ${{ secrets.MAVEN_GPG_PASSPHRASE }} -# -# - name: Release -# uses: softprops/action-gh-release@a6c7483a42ee9d5daced968f6c217562cd680f7f #v2 -# with: -# generate_release_notes: true -# tag_name: ${{ inputs.tag }} -# prerelease: ${{ inputs.dev }} -# -# notify: -# if: inputs.dev == false -# needs: release -# uses: Checkmarx/plugins-release-workflow/.github/workflows/release-notify.yml@main -# with: -# product_name: Java Wrapper -# release_version: ${{ needs.release.outputs.TAG_NAME }} -# cli_release_version: ${{ needs.release.outputs.CLI_VERSION }} -# release_author: "Phoenix Team" -# release_url: https://github.com/CheckmarxDev/ast-cli-java-wrapper/releases/tag/${{ needs.release.outputs.TAG_NAME }} -# jira_product_name: JAVA_WRAPPER -# secrets: inherit -# -# dispatch_auto_release: -# name: Update Jenkins/Jetbrains/Eclipse Extensions With new Wrapper Version -# if: inputs.dev == false -# needs: notify -# uses: Checkmarx/plugins-release-workflow/.github/workflows/dispatch-workflow.yml@main -# with: -# cli_version: ${{ needs.release.outputs.CLI_VERSION }} -# is_cli_release: false -# is_java_release: true -# secrets: inherit \ No newline at end of file + - name: Publish package + run: mvn --batch-mode deploy -DskipTests ${{ env.AID_PROP }} + env: + MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }} + MAVEN_PASSWORD: ${{ secrets.OSSRH_TOKEN }} + MAVEN_GPG_PASSPHRASE: ${{ secrets.MAVEN_GPG_PASSPHRASE }} + + - name: Release + uses: softprops/action-gh-release@a6c7483a42ee9d5daced968f6c217562cd680f7f #v2 + with: + generate_release_notes: true + tag_name: ${{ inputs.tag }} + prerelease: ${{ inputs.dev }} + + notify: + if: inputs.dev == false + needs: release + uses: Checkmarx/plugins-release-workflow/.github/workflows/release-notify.yml@main + with: + product_name: Java Wrapper + release_version: ${{ needs.release.outputs.TAG_NAME }} + cli_release_version: ${{ needs.release.outputs.CLI_VERSION }} + release_author: "Phoenix Team" + release_url: https://github.com/CheckmarxDev/ast-cli-java-wrapper/releases/tag/${{ needs.release.outputs.TAG_NAME }} + jira_product_name: JAVA_WRAPPER + secrets: inherit + + dispatch_auto_release: + name: Update Jenkins/Jetbrains/Eclipse Extensions With new Wrapper Version + if: inputs.dev == false + needs: notify + uses: Checkmarx/plugins-release-workflow/.github/workflows/dispatch-workflow.yml@main + with: + cli_version: ${{ needs.release.outputs.CLI_VERSION }} + is_cli_release: false + is_java_release: true + secrets: inherit \ No newline at end of file