Skip to content

Commit 2dd5c3c

Browse files
Add release notification (AST-000) (#798)
* Add notification for new release (AST-000) * Add notification for new release (AST-000) * Add notification for new release (AST-000) * Add notification for new release (AST-000) * Add notification for new release (AST-000) * Add notification for new release (AST-000) * Add notification for new release (AST-000) * Add notification for new release (AST-000) * Add notification for new release (AST-000) * Add notification for new release (AST-000) * Add notification for new release (AST-000)
1 parent 2153f17 commit 2dd5c3c

File tree

1 file changed

+31
-5
lines changed

1 file changed

+31
-5
lines changed

.github/workflows/release.yml

Lines changed: 31 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
name: Javascript Wrapper Release
32

43
on:
@@ -50,8 +49,11 @@ jobs:
5049
release:
5150
runs-on: ubuntu-latest
5251
env:
53-
GITHUB_TOKEN: ${{ secrets.OR_GITHUB_TOKEN }}
54-
BRANCH_NAME: npm-version-patch
52+
GITHUB_TOKEN: ${{ secrets.OR_GITHUB_TOKEN }}
53+
BRANCH_NAME: npm-version-patch
54+
outputs:
55+
TAG_NAME: ${{ steps.set_tag_name.outputs.TAG_NAME }}
56+
CLI_VERSION: ${{ steps.extract_cli_version.outputs.CLI_VERSION }}
5557
steps:
5658

5759
# CHECKOUT PROJECT
@@ -73,12 +75,15 @@ jobs:
7375

7476
# GET TAG NAME
7577
- name: Generate Tag name
78+
id: set_tag_name
7679
run: |
7780
if [ ${{ inputs.dev }} == true ]; then
78-
echo "TAG_NAME=$(npm version prerelease --preid=${{ inputs.jsTag }} --no-git-tag-version --allow-same-version)" >> $GITHUB_ENV
81+
TAG_NAME=$(npm version prerelease --preid=${{ inputs.jsTag }} --no-git-tag-version --allow-same-version)
7982
else
80-
echo "TAG_NAME=$(npm version patch --no-git-tag-version)" >> $GITHUB_ENV
83+
TAG_NAME=$(npm version patch --no-git-tag-version)
8184
fi
85+
echo "TAG_NAME=$TAG_NAME" >> $GITHUB_ENV
86+
echo "::set-output name=TAG_NAME::$TAG_NAME"
8287
8388
# DOWNLOAD CLI IF IT IS A DEV VERSION AND A CLI TAG WAS PROVIDED
8489
- name: Download cli with tag ${{ inputs.cliTag }}
@@ -88,6 +93,14 @@ jobs:
8893
chmod +x ./.github/scripts/update_cli.sh
8994
./.github/scripts/update_cli.sh ${{ inputs.cliTag }}
9095
96+
- name: Extract CLI version
97+
id: extract_cli_version
98+
run: |
99+
CLI_VERSION=$(./src/main/wrapper/resources/cx-linux version | grep -Eo '^[0-9]+\.[0-9]+\.[0-9]+')
100+
echo "CLI version being packed is $CLI_VERSION"
101+
echo "CLI_VERSION=$CLI_VERSION" >> $GITHUB_ENV
102+
echo "::set-output name=CLI_VERSION::$CLI_VERSION"
103+
91104
# RUN NPM INSTALL AND BUILD
92105
- name: NPM ci and build
93106
run: |
@@ -151,3 +164,16 @@ jobs:
151164
tag_name: ${{env.TAG_NAME}}
152165
generate_release_notes: true
153166
prerelease: ${{ inputs.dev }}
167+
168+
notify:
169+
if: inputs.dev == false
170+
needs: release
171+
uses: Checkmarx/plugins-release-workflow/.github/workflows/release-notify.yml@main
172+
with:
173+
product_name: Javascript Wrapper
174+
release_version: ${{ needs.release.outputs.TAG_NAME }}
175+
cli_release_version: ${{ needs.release.outputs.CLI_VERSION }}
176+
release_author: "Phoenix Team"
177+
release_url: https://github.com/CheckmarxDev/ast-cli-javascript-wrapper/releases/tag/${{ needs.release.outputs.TAG_NAME }}
178+
jira_product_name: JAVASCRIPT_WRAPPER
179+
secrets: inherit

0 commit comments

Comments
 (0)