1616 description : ' Version of the CLI to bundle'
1717 required : false
1818 type : string
19+ publish :
20+ description : ' Publish package to Maven Central'
21+ required : false
22+ default : false
23+ type : boolean
1924 workflow_call :
2025 inputs :
2126 tag :
3136 description : ' Version of the CLI to bundle'
3237 required : false
3338 type : string
39+ publish :
40+ description : ' Publish package to Maven Central'
41+ required : false
42+ default : false
43+ type : boolean
44+
45+ permissions :
46+ contents : read
3447 secrets :
3548 MAVEN_GPG_PASSPHRASE :
3649 required : true
4558
4659jobs :
4760 release :
61+ permissions :
62+ id-token : write
63+ contents : write
4864 runs-on : cx-public-ubuntu-x64
4965 outputs :
5066 CLI_VERSION : ${{ steps.extract_cli_version.outputs.CLI_VERSION }}
6884 CLI_VERSION=$(./src/main/resources/cx-linux version | grep -Eo '^[0-9]+\.[0-9]+\.[0-9]+')
6985 echo "CLI version being packed is $CLI_VERSION"
7086 echo "CLI_VERSION=$CLI_VERSION" >> $GITHUB_ENV
71- echo "::set-output name= CLI_VERSION:: $CLI_VERSION"
87+ echo "CLI_VERSION= $CLI_VERSION" >> $GITHUB_OUTPUT
7288
7389 - name : Check if CLI version is latest
7490 if : ${{ github.event.inputs.dev == 'false' && !github.event.inputs.cliTag && github.ref == 'refs/heads/main' }}
@@ -96,15 +112,7 @@ jobs:
96112 git config user.email "${GITHUB_ACTOR}@users.noreply.github.com"
97113 git tag -a "${tag}" -m "${message}"
98114 git push origin "${tag}"
99- echo "::set-output name=TAG_NAME::${{ inputs.tag }}"
100-
101- - name : Cache local Maven repository
102- uses : actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
103- with :
104- path : ~/.m2/repository
105- key : ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
106- restore-keys : |
107- ${{ runner.os }}-maven-
115+ echo "TAG_NAME=${{ inputs.tag }}" >> $GITHUB_OUTPUT
108116
109117 - name : Set up Maven Central Repository
110118 uses : actions/setup-java@2dfa2011c5b2a0f1489bf9e433881c92c1631f88 # v4.3.0
@@ -129,6 +137,7 @@ jobs:
129137 echo "AID_PROP=${prop}" >> $GITHUB_ENV
130138
131139 - name : Publish package
140+ if : inputs.publish == true
132141 run : mvn --batch-mode deploy -DskipTests ${{ env.AID_PROP }}
133142 env :
134143 MAVEN_USERNAME : ${{ secrets.OSSRH_USERNAME }}
@@ -142,26 +151,26 @@ jobs:
142151 tag_name : ${{ inputs.tag }}
143152 prerelease : ${{ inputs.dev }}
144153
145- notify :
146- if : inputs.dev == false
147- needs : release
148- uses : Checkmarx/plugins-release-workflow/.github/workflows/release-notify.yml@main
149- with :
150- product_name : Java Wrapper
151- release_version : ${{ needs.release.outputs.TAG_NAME }}
152- cli_release_version : ${{ needs.release.outputs.CLI_VERSION }}
153- release_author : " Sypher Team"
154- release_url : https://github.com/Checkmarx/ast-cli-java-wrapper/releases/tag/${{ needs.release.outputs.TAG_NAME }}
155- jira_product_name : JAVA_WRAPPER
156- secrets : inherit
154+ # notify:
155+ # if: inputs.dev == false
156+ # needs: release
157+ # uses: Checkmarx/plugins-release-workflow/.github/workflows/release-notify.yml@main
158+ # with:
159+ # product_name: Java Wrapper
160+ # release_version: ${{ needs.release.outputs.TAG_NAME }}
161+ # cli_release_version: ${{ needs.release.outputs.CLI_VERSION }}
162+ # release_author: "Sypher Team"
163+ # release_url: https://github.com/Checkmarx/ast-cli-java-wrapper/releases/tag/${{ needs.release.outputs.TAG_NAME }}
164+ # jira_product_name: JAVA_WRAPPER
165+ # secrets: inherit
157166
158- dispatch_auto_release :
159- name : Update Jenkins/Jetbrains/Eclipse Extensions With new Wrapper Version
160- if : inputs.dev == false
161- needs : notify
162- uses : Checkmarx/plugins-release-workflow/.github/workflows/dispatch-workflow.yml@main
163- with :
164- cli_version : ${{ needs.release.outputs.CLI_VERSION }}
165- is_cli_release : false
166- is_java_release : true
167- secrets : inherit
167+ # dispatch_auto_release:
168+ # name: Update Jenkins/Jetbrains/Eclipse Extensions With new Wrapper Version
169+ # if: inputs.dev == false
170+ # needs: notify
171+ # uses: Checkmarx/plugins-release-workflow/.github/workflows/dispatch-workflow.yml@main
172+ # with:
173+ # cli_version: ${{ needs.release.outputs.CLI_VERSION }}
174+ # is_cli_release: false
175+ # is_java_release: true
176+ # secrets: inherit
0 commit comments