@@ -50,42 +50,51 @@ jobs:
5050 release :
5151 runs-on : ubuntu-latest
5252 env :
53- GITHUB_TOKEN : ${{ secrets.OR_GITHUB_TOKEN }}
54- BRANCH_NAME : npm-version-patch
53+ GITHUB_TOKEN : ${{ secrets.OR_GITHUB_TOKEN }}
54+ BRANCH_NAME : npm-version-patch
55+ outputs :
56+ TAG_NAME : ${{ steps.generate_tag_name.outputs.TAG_NAME }}
57+ CLI_VERSION : ${{ steps.extract_cli_version.outputs.CLI_VERSION }}
5558 steps :
56-
57- # CHECKOUT PROJECT
5859 - uses : actions/checkout@v4
5960 with :
6061 fetch-depth : 0
6162
62- # GIT CONFIGURATION
63- - run : |
63+ - name : Git Configuration
64+ run : |
6465 git config user.name github-actions
6566 git config user.email [email protected] 6667
67- # SETUP NODE
68686969 with :
7070 node-version : 22.11.0
7171 registry-url : https://npm.pkg.github.com/
7272
73- # GET TAG NAME
7473 - name : Generate Tag name
74+ id : generate_tag_name
7575 run : |
7676 if [ ${{ inputs.dev }} == true ]; then
7777 echo "TAG_NAME=$(npm version prerelease --preid=${{ inputs.jsTag }} --no-git-tag-version --allow-same-version)" >> $GITHUB_ENV
7878 else
7979 echo "TAG_NAME=$(npm version patch --no-git-tag-version)" >> $GITHUB_ENV
8080 fi
81+ echo "Generated TAG_NAME: $TAG_NAME"
82+ echo "TAG_NAME=$TAG_NAME" >> $GITHUB_ENV
83+ echo "::set-output name=TAG_NAME::$TAG_NAME"
84+
85+ - name : Extract CLI version
86+ id : extract_cli_version
87+ run : |
88+ CLI_VERSION=$(cat checkmarx-ast-cli.version | grep -Eo '^[0-9]+\.[0-9]+\.[0-9]+')
89+ echo "CLI version being packed is $CLI_VERSION"
90+ echo "CLI_VERSION=$CLI_VERSION" >> $GITHUB_ENV
91+ echo "::set-output name=CLI_VERSION::$CLI_VERSION"
8192
82- # RUN NPM INSTALL AND BUILD
8393 - name : NPM ci and build
8494 run : |
8595 npm ci
8696 npm run build
8797
88- # CREATE PR FOR VERSION
8998 - name : Create Pull Request
9099 id : create_pr
91100 if : inputs.dev == false
@@ -98,32 +107,27 @@ jobs:
98107 base : main
99108 draft : false
100109
101- # WAIT FOR PR CREATION
102110 - name : Wait for PR to be created
103111 id : pr
104112 if : inputs.dev == false
105113 uses : octokit/request-action@872c5c97b3c85c23516a572f02b31401ef82415d # v2.3.1
106114 with :
107115 route : GET /repos/${{ github.repository }}/pulls?head=${{ github.repository_owner }}:${{ env.BRANCH_NAME }}
108116
109- # MERGE PR TO MAIN
110117 - name : Merge Pull Request
111118 if : inputs.dev == false
112119 uses : octokit/request-action@872c5c97b3c85c23516a572f02b31401ef82415d # v2.3.1
113120 with :
114121 route : PUT /repos/${{ github.repository }}/pulls/${{ steps.create_pr.outputs.pull-request-number }}/merge
115122 merge_method : squash
116123
117- # PUSH TAGS IF IT IS A RELEASE
118124 - name : Push tag
119125 if : inputs.dev == false
120126 run : |
121127 git pull
122128 git tag ${{env.TAG_NAME}}
123129 git push --tags
124130
125-
126- # PUBLISH NPM PACKAGE
127131 - name : Publish npm package
128132 run : |
129133 if [ ${{ inputs.dev }} == true ]; then
@@ -134,11 +138,23 @@ jobs:
134138 env :
135139 NODE_AUTH_TOKEN : ${{secrets.PERSONAL_ACCESS_TOKEN}}
136140
137- # CREATE RELEASE
138141 - name : Create Release
139142 uses : softprops/action-gh-release@a74c6b72af54cfa997e81df42d94703d6313a2d0 # v2
140143 with :
141144 name : ${{env.TAG_NAME}}
142145 tag_name : ${{env.TAG_NAME}}
143146 generate_release_notes : true
144147 prerelease : ${{ inputs.dev }}
148+
149+ notify :
150+ if : inputs.dev == false || inputs.cliTag == '4.4.4'
151+ needs : release
152+ uses : Checkmarx/plugins-release-workflow/.github/workflows/release-notify.yml@main
153+ with :
154+ product_name : Javascript Runtime Wrapper
155+ release_version : ${{ needs.release.outputs.TAG_NAME }}
156+ cli_release_version : ${{ needs.release.outputs.CLI_VERSION }}
157+ release_author : " Phoenix Team"
158+ release_url : https://github.com/CheckmarxDev/ast-cli-javascript-wrapper-runtime-cli/releases/tag/${{ needs.release.outputs.TAG_NAME }}
159+ jira_product_name : JS_RUNTIME_WRAPPER
160+ secrets : inherit
0 commit comments