@@ -30,15 +30,30 @@ jobs:
30
30
# needs: build
31
31
runs-on : ubuntu-latest
32
32
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
36
51
with :
37
52
node-version : 16
38
53
registry-url : https://registry.npmjs.org/
39
- # - run: cat .npmrc
40
- - run : echo ${{ secrets }}
54
+
41
55
- name : Install dependencies
56
+ if : steps.check.outputs.changed == 'true'
42
57
uses : borales/actions-yarn@v4.2.0
43
58
with :
44
59
cmd : install
55
70
# package: client/packages/lowcoder-comps
56
71
# token: ${{ secrets.NPM_TOKEN }}
57
72
- name : Publish
73
+ if : steps.check.outputs.changed == 'true'
58
74
uses : borales/actions-yarn@v4.2.0
59
75
with :
60
76
cmd : build_publish
0 commit comments