@@ -50,42 +50,51 @@ jobs:
50
50
release :
51
51
runs-on : ubuntu-latest
52
52
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 }}
55
58
steps :
56
-
57
- # CHECKOUT PROJECT
58
59
- uses : actions/checkout@v4
59
60
with :
60
61
fetch-depth : 0
61
62
62
- # GIT CONFIGURATION
63
- - run : |
63
+ - name : Git Configuration
64
+ run : |
64
65
git config user.name github-actions
65
66
git config user.email [email protected]
66
67
67
- # SETUP NODE
68
68
69
69
with :
70
70
node-version : 22.11.0
71
71
registry-url : https://npm.pkg.github.com/
72
72
73
- # GET TAG NAME
74
73
- name : Generate Tag name
74
+ id : generate_tag_name
75
75
run : |
76
76
if [ ${{ inputs.dev }} == true ]; then
77
77
echo "TAG_NAME=$(npm version prerelease --preid=${{ inputs.jsTag }} --no-git-tag-version --allow-same-version)" >> $GITHUB_ENV
78
78
else
79
79
echo "TAG_NAME=$(npm version patch --no-git-tag-version)" >> $GITHUB_ENV
80
80
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"
81
92
82
- # RUN NPM INSTALL AND BUILD
83
93
- name : NPM ci and build
84
94
run : |
85
95
npm ci
86
96
npm run build
87
97
88
- # CREATE PR FOR VERSION
89
98
- name : Create Pull Request
90
99
id : create_pr
91
100
if : inputs.dev == false
@@ -98,32 +107,27 @@ jobs:
98
107
base : main
99
108
draft : false
100
109
101
- # WAIT FOR PR CREATION
102
110
- name : Wait for PR to be created
103
111
id : pr
104
112
if : inputs.dev == false
105
113
uses : octokit/request-action@872c5c97b3c85c23516a572f02b31401ef82415d # v2.3.1
106
114
with :
107
115
route : GET /repos/${{ github.repository }}/pulls?head=${{ github.repository_owner }}:${{ env.BRANCH_NAME }}
108
116
109
- # MERGE PR TO MAIN
110
117
- name : Merge Pull Request
111
118
if : inputs.dev == false
112
119
uses : octokit/request-action@872c5c97b3c85c23516a572f02b31401ef82415d # v2.3.1
113
120
with :
114
121
route : PUT /repos/${{ github.repository }}/pulls/${{ steps.create_pr.outputs.pull-request-number }}/merge
115
122
merge_method : squash
116
123
117
- # PUSH TAGS IF IT IS A RELEASE
118
124
- name : Push tag
119
125
if : inputs.dev == false
120
126
run : |
121
127
git pull
122
128
git tag ${{env.TAG_NAME}}
123
129
git push --tags
124
130
125
-
126
- # PUBLISH NPM PACKAGE
127
131
- name : Publish npm package
128
132
run : |
129
133
if [ ${{ inputs.dev }} == true ]; then
@@ -134,11 +138,23 @@ jobs:
134
138
env :
135
139
NODE_AUTH_TOKEN : ${{secrets.PERSONAL_ACCESS_TOKEN}}
136
140
137
- # CREATE RELEASE
138
141
- name : Create Release
139
142
uses : softprops/action-gh-release@a74c6b72af54cfa997e81df42d94703d6313a2d0 # v2
140
143
with :
141
144
name : ${{env.TAG_NAME}}
142
145
tag_name : ${{env.TAG_NAME}}
143
146
generate_release_notes : true
144
147
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