3535jobs :
3636 release :
3737 runs-on : ubuntu-latest
38+ outputs :
39+ CLI_VERSION : ${{ steps.extract_cli_version.outputs.CLI_VERSION }}
40+ TAG_NAME : ${{ steps.set_tag_name.outputs.TAG_NAME }}
3841 steps :
3942 - name : Checkout
4043 uses : actions/checkout@v4
4952 ./.github/scripts/update_cli.sh ${{ inputs.cliTag }}
5053
5154 - name : Tag
55+ id : set_tag_name
5256 run : |
5357 echo ${{ inputs.tag }}
5458 tag=${{ inputs.tag }}
5862 git config user.email "${GITHUB_ACTOR}@users.noreply.github.com"
5963 git tag -a "${tag}" -m "${message}"
6064 git push origin "${tag}"
65+ echo "::set-output name=TAG_NAME::${{ inputs.tag }}"
6166
6267 - name : Cache local Maven repository
6368 uses : actions/cache@v4
7782 server-password : MAVEN_PASSWORD
7883 gpg-private-key : ${{ secrets.MAVEN_GPG_PRIVATE_KEY }}
7984 gpg-passphrase : MAVEN_GPG_PASSPHRASE
80-
8185
82-
8386 - name : Update the POM version.
8487 run : mvn -B versions:set -DnewVersion='${{ env.RELEASE_VERSION }}' --file pom.xml -DskipTests
8588
9194 fi
9295 echo "AID_PROP=${prop}" >> $GITHUB_ENV
9396
97+ - name : Extract CLI version
98+ id : extract_cli_version
99+ run : |
100+ CLI_VERSION=$(./src/main/resources/cx-linux version | grep -Eo '^[0-9]+\.[0-9]+\.[0-9]+')
101+ echo "CLI version being packed is $CLI_VERSION"
102+ echo "CLI_VERSION=$CLI_VERSION" >> $GITHUB_ENV
103+ echo "::set-output name=CLI_VERSION::$CLI_VERSION"
104+
94105 - name : Publish package
95106 run : mvn --batch-mode deploy -DskipTests ${{ env.AID_PROP }}
96107 env :
@@ -104,3 +115,16 @@ jobs:
104115 generate_release_notes : true
105116 tag_name : ${{ inputs.tag }}
106117 prerelease : ${{ inputs.dev }}
118+
119+ notify :
120+ if : inputs.dev == false
121+ needs : release
122+ uses : Checkmarx/plugins-release-workflow/.github/workflows/release-notify.yml@main
123+ with :
124+ product_name : Java Wrapper
125+ release_version : ${{ needs.release.outputs.TAG_NAME }}
126+ cli_release_version : ${{ needs.release.outputs.CLI_VERSION }}
127+ release_author : " Phoenix Team"
128+ release_url : https://github.com/CheckmarxDev/ast-cli-java-wrapper/releases/tag/${{ needs.release.outputs.TAG_NAME }}
129+ jira_product_name : JAVA_WRAPPER
130+ secrets : inherit
0 commit comments