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
3548jobs :
3649 release :
50+ permissions :
51+ id-token : write
52+ contents : write
3753 runs-on : cx-public-ubuntu-x64
3854 outputs :
3955 CLI_VERSION : ${{ steps.extract_cli_version.outputs.CLI_VERSION }}
5773 CLI_VERSION=$(./src/main/resources/cx-linux version | grep -Eo '^[0-9]+\.[0-9]+\.[0-9]+')
5874 echo "CLI version being packed is $CLI_VERSION"
5975 echo "CLI_VERSION=$CLI_VERSION" >> $GITHUB_ENV
60- echo "::set-output name= CLI_VERSION:: $CLI_VERSION"
76+ echo "CLI_VERSION= $CLI_VERSION" >> $GITHUB_OUTPUT
6177
6278 - name : Check if CLI version is latest
6379 if : ${{ github.event.inputs.dev == 'false' && !github.event.inputs.cliTag && github.ref == 'refs/heads/main' }}
@@ -85,15 +101,7 @@ jobs:
85101 git config user.email "${GITHUB_ACTOR}@users.noreply.github.com"
86102 git tag -a "${tag}" -m "${message}"
87103 git push origin "${tag}"
88- echo "::set-output name=TAG_NAME::${{ inputs.tag }}"
89-
90- - name : Cache local Maven repository
91- uses : actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
92- with :
93- path : ~/.m2/repository
94- key : ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
95- restore-keys : |
96- ${{ runner.os }}-maven-
104+ echo "TAG_NAME=${{ inputs.tag }}" >> $GITHUB_OUTPUT
97105
98106 - name : Set up Maven Central Repository
99107 uses : actions/setup-java@2dfa2011c5b2a0f1489bf9e433881c92c1631f88 # v4.3.0
@@ -118,6 +126,7 @@ jobs:
118126 echo "AID_PROP=${prop}" >> $GITHUB_ENV
119127
120128 - name : Publish package
129+ if : inputs.publish == true
121130 run : mvn --batch-mode deploy -DskipTests ${{ env.AID_PROP }}
122131 env :
123132 MAVEN_USERNAME : ${{ secrets.OSSRH_USERNAME }}
@@ -131,26 +140,26 @@ jobs:
131140 tag_name : ${{ inputs.tag }}
132141 prerelease : ${{ inputs.dev }}
133142
134- notify :
135- if : inputs.dev == false
136- needs : release
137- uses : Checkmarx/plugins-release-workflow/.github/workflows/release-notify.yml@main
138- with :
139- product_name : Java Wrapper
140- release_version : ${{ needs.release.outputs.TAG_NAME }}
141- cli_release_version : ${{ needs.release.outputs.CLI_VERSION }}
142- release_author : " Sypher Team"
143- release_url : https://github.com/Checkmarx/ast-cli-java-wrapper/releases/tag/${{ needs.release.outputs.TAG_NAME }}
144- jira_product_name : JAVA_WRAPPER
145- secrets : inherit
143+ # notify:
144+ # if: inputs.dev == false
145+ # needs: release
146+ # uses: Checkmarx/plugins-release-workflow/.github/workflows/release-notify.yml@main
147+ # with:
148+ # product_name: Java Wrapper
149+ # release_version: ${{ needs.release.outputs.TAG_NAME }}
150+ # cli_release_version: ${{ needs.release.outputs.CLI_VERSION }}
151+ # release_author: "Sypher Team"
152+ # release_url: https://github.com/Checkmarx/ast-cli-java-wrapper/releases/tag/${{ needs.release.outputs.TAG_NAME }}
153+ # jira_product_name: JAVA_WRAPPER
154+ # secrets: inherit
146155
147- dispatch_auto_release :
148- name : Update Jenkins/Jetbrains/Eclipse Extensions With new Wrapper Version
149- if : inputs.dev == false
150- needs : notify
151- uses : Checkmarx/plugins-release-workflow/.github/workflows/dispatch-workflow.yml@main
152- with :
153- cli_version : ${{ needs.release.outputs.CLI_VERSION }}
154- is_cli_release : false
155- is_java_release : true
156- secrets : inherit
156+ # dispatch_auto_release:
157+ # name: Update Jenkins/Jetbrains/Eclipse Extensions With new Wrapper Version
158+ # if: inputs.dev == false
159+ # needs: notify
160+ # uses: Checkmarx/plugins-release-workflow/.github/workflows/dispatch-workflow.yml@main
161+ # with:
162+ # cli_version: ${{ needs.release.outputs.CLI_VERSION }}
163+ # is_cli_release: false
164+ # is_java_release: true
165+ # secrets: inherit
0 commit comments