@@ -2,9 +2,17 @@ name: 'nativescript -> npm'
22
33on :
44 workflow_dispatch :
5-
6- env :
7- NPM_TAG : ' next'
5+ inputs :
6+ bump_version :
7+ description : ' Bump Version'
8+ required : true
9+ default : true
10+ type : boolean
11+ next_version :
12+ description : ' Next Version with Next tag'
13+ required : true
14+ default : true
15+ type : boolean
816
917jobs :
1018 release :
@@ -20,20 +28,41 @@ jobs:
2028 - name : Setup
2129 run : npm i --ignore-scripts --legacy-peer-deps --no-package-lock
2230
31+ - name : Bump Standard Version
32+ if : github.event.inputs.bump_version == 'true'
33+ run : |
34+ npm run release
35+
2336 - name : Generate Version
2437 run : |
2538 echo NPM_VERSION=$(node -e "console.log(require('./package.json').version);") >> $GITHUB_ENV
2639
2740 - name : Bump Version
41+ if : github.event.inputs.next_version == 'true'
2842 run : npm version $NPM_VERSION
2943
3044 - name : Build nativescript
3145 run : npm pack
32-
33- - name : Publish nativescript
46+
47+ - name : npm ENV
3448 env :
3549 NPM_TOKEN : ${{ secrets.NPM_PUBLISH_TOKEN }}
50+ run : echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > .npmrc
51+
52+ - name : Publish next nativescript version
53+ if : github.event.inputs.next_version == 'true'
3654 run : |
37- echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > .npmrc
3855 echo "Publishing nativescript@$NPM_VERSION to NPM with tag $NPM_TAG..."
3956 npm publish akylas-nativescript-cli-$NPM_VERSION.tgz --tag $NPM_TAG
57+
58+ - name : Publish nativescript
59+ if : github.event.inputs.next_version == 'false'
60+ run : |
61+ echo "Publishing nativescript@$NPM_VERSION to NPM..."
62+ npm publish akylas-nativescript-cli-$NPM_VERSION.tgz
63+
64+ - name : Push to git
65+ if : github.event.inputs.bump_version == 'true'
66+ run : |
67+ git push origin --tags
68+ git push origin
0 commit comments