File tree Expand file tree Collapse file tree 1 file changed +15
-2
lines changed Expand file tree Collapse file tree 1 file changed +15
-2
lines changed Original file line number Diff line number Diff line change @@ -5,29 +5,38 @@ name: Node.js Package
5
5
6
6
on :
7
7
release :
8
- types : [created ]
8
+ types : [published ]
9
9
10
10
jobs :
11
11
build :
12
12
runs-on : ubuntu-latest
13
13
steps :
14
+ -
uses :
olegtarasov/[email protected]
15
+ id : tagName
14
16
- uses : actions/checkout@v2
15
17
- uses : actions/setup-node@v1
16
18
with :
17
19
node-version : 12
20
+ - name : update the version with TAG
21
+ run : echo $(jq --arg a "$GIT_TAG_NAME" '.version = ($a)' package.json) > package.json
18
22
- run : yarn install
19
- - run : yarn build
23
+ - run : yarn build
24
+
20
25
21
26
publish-npm :
22
27
needs : build
23
28
runs-on : ubuntu-latest
24
29
steps :
30
+ -
uses :
olegtarasov/[email protected]
31
+ id : tagName
25
32
- uses : actions/checkout@v2
26
33
- uses : actions/setup-node@v1
27
34
with :
28
35
node-version : 12
29
36
registry-url : https://registry.npmjs.org/
30
37
scope : openimis
38
+ - name : update the version with TAG
39
+ run : echo $(jq --arg a "$GIT_TAG_NAME" '.version = ($a)' package.json) > package.json
31
40
- run : yarn install
32
41
- run : yarn build
33
42
- run : npm publish --access public
@@ -38,11 +47,15 @@ jobs:
38
47
needs : build
39
48
runs-on : ubuntu-latest
40
49
steps :
50
+ -
uses :
olegtarasov/[email protected]
51
+ id : tagName
41
52
- uses : actions/checkout@v2
42
53
- uses : actions/setup-node@v1
43
54
with :
44
55
node-version : 12
45
56
registry-url : https://npm.pkg.github.com/
57
+ - name : update the version with TAG
58
+ run : echo $(jq --arg a "$GIT_TAG_NAME" '.version = ($a)' package.json) > package.json
46
59
- run : yarn install
47
60
- run : yarn build
48
61
- run : npm publish
You can’t perform that action at this time.
0 commit comments