Skip to content

Commit 31ceb15

Browse files
Add notify step to release.yml (AST-000) (#397)
* Add notify step to release.yml (AST-000) * fix input to inputs * fix input to inputs * fix input to inputs * fix input to inputs * fix input to inputs * fix input to inputs * change if condition to notify job --------- Co-authored-by: AlvoBen <[email protected]>
1 parent e6a26cb commit 31ceb15

File tree

1 file changed

+26
-2
lines changed

1 file changed

+26
-2
lines changed

.github/workflows/release.yml

Lines changed: 26 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,9 @@ on:
3535
jobs:
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
@@ -49,6 +52,7 @@ jobs:
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 }}
@@ -58,6 +62,7 @@ jobs:
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
@@ -77,9 +82,7 @@ jobs:
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

@@ -91,6 +94,14 @@ jobs:
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

Comments
 (0)