@@ -30,15 +30,30 @@ jobs:
3030 # needs: build
3131 runs-on : ubuntu-latest
3232 steps :
33- - uses : actions/checkout@v3
34- # Setup .npmrc file to publish to npm
35- - uses : actions/setup-node@v3
33+ - name : Checkout repository
34+ uses : actions/checkout@v3
35+ # # Setup .npmrc file to publish to npm
36+ # - uses: actions/setup-node@v3
37+ # with:
38+ # node-version: 16
39+ # registry-url: https://registry.npmjs.org/
40+ - name : Check version changes
41+ uses : EndBug/version-check@v1
42+ id : check
43+
44+ - name : Version update detected
45+ if : steps.check.outputs.changed == 'true'
46+ run : ' echo "Version change found! New version: ${{ steps.check.outputs.version }} (${{ steps.check.outputs.type }})"'
47+
48+ - name : Set up Node.js for NPM
49+ if : steps.check.outputs.changed == 'true'
50+ uses : actions/setup-node@v3
3651 with :
3752 node-version : 16
3853 registry-url : https://registry.npmjs.org/
39- # - run: cat .npmrc
40- - run : echo ${{ secrets }}
54+
4155 - name : Install dependencies
56+ if : steps.check.outputs.changed == 'true'
42574358 with :
4459 cmd : install
5570 # package: client/packages/lowcoder-comps
5671 # token: ${{ secrets.NPM_TOKEN }}
5772 - name : Publish
73+ if : steps.check.outputs.changed == 'true'
58745975 with :
6076 cmd : build_publish
0 commit comments