Skip to content

Commit de546a0

Browse files
Bump npm version to 0.0.156
1 parent 284155e commit de546a0

2 files changed

Lines changed: 19 additions & 6 deletions

File tree

.github/workflows/release.yml

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,11 @@ on:
1818
required: false
1919
default: true
2020
type: boolean
21+
bumpVersion:
22+
description: 'Bump npm version, create and merge version PR'
23+
required: false
24+
default: true
25+
type: boolean
2126
workflow_dispatch:
2227
inputs:
2328
cliTag:
@@ -33,6 +38,11 @@ on:
3338
required: false
3439
default: true
3540
type: boolean
41+
bumpVersion:
42+
description: 'Bump npm version, create and merge version PR'
43+
required: false
44+
default: true
45+
type: boolean
3646

3747
permissions:
3848
contents: read
@@ -84,11 +94,14 @@ jobs:
8494
env:
8595
INPUT_DEV: ${{ inputs.dev }}
8696
INPUT_JS_TAG: ${{ inputs.jsTag }}
97+
INPUT_BUMP_VERSION: ${{ inputs.bumpVersion }}
8798
run: |
8899
if [ "$INPUT_DEV" == "true" ]; then
89100
TAG_NAME=$(npm version prerelease --preid="$INPUT_JS_TAG" --no-git-tag-version --allow-same-version)
90-
else
101+
elif [ "$INPUT_BUMP_VERSION" == "true" ]; then
91102
TAG_NAME=$(npm version patch --no-git-tag-version)
103+
else
104+
TAG_NAME=v$(node -p "require('./package.json').version")
92105
fi
93106
echo "TAG_NAME=$TAG_NAME" >> $GITHUB_ENV
94107
echo "TAG_NAME=$TAG_NAME" >> $GITHUB_OUTPUT
@@ -120,7 +133,7 @@ jobs:
120133
# CREATE PR FOR VERSION
121134
- name: Create Pull Request
122135
id: create_pr
123-
if: inputs.dev == false
136+
if: inputs.dev == false && inputs.bumpVersion == true
124137
uses: step-security/create-pull-request@50c103da2b9ca12cd5bc013fc6931051a5aa872b # v8.1.1
125138
with:
126139
token: ${{ env.GITHUB_TOKEN }}
@@ -133,14 +146,14 @@ jobs:
133146
# WAIT FOR PR CREATION
134147
- name: Wait for PR to be created
135148
id: pr
136-
if: inputs.dev == false
149+
if: inputs.dev == false && inputs.bumpVersion == true
137150
uses: octokit/request-action@b91aabaa861c777dcdb14e2387e30eddf04619ae # v3.0.0
138151
with:
139152
route: GET /repos/${{ github.repository }}/pulls?head=${{ github.repository_owner }}:${{ env.BRANCH_NAME }}
140153

141154
# MERGE PR TO MAIN
142155
- name: Merge Pull Request
143-
if: inputs.dev == false
156+
if: inputs.dev == false && inputs.bumpVersion == true
144157
uses: octokit/request-action@b91aabaa861c777dcdb14e2387e30eddf04619ae # v3.0.0
145158
with:
146159
route: PUT /repos/${{ github.repository }}/pulls/${{ steps.create_pr.outputs.pull-request-number }}/merge

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@Checkmarx/ast-cli-javascript-wrapper",
3-
"version": "0.0.155",
3+
"version": "0.0.156",
44
"description": "AST CLI Javascript wrapper",
55
"main": "dist/main/wrapper/CxWrapper.js",
66
"typings": "dist/main/wrapper/CxWrapper.d.ts",
@@ -51,4 +51,4 @@
5151
"publishConfig": {
5252
"registry": "https://npm.pkg.github.com"
5353
}
54-
}
54+
}

0 commit comments

Comments
 (0)