File tree 3 files changed +53
-0
lines changed
3 files changed +53
-0
lines changed Original file line number Diff line number Diff line change @@ -168,6 +168,7 @@ jobs:
168
168
- name : Upload demo-dist folder
169
169
uses : actions/upload-pages-artifact@v1
170
170
with :
171
+ name : demoDist
171
172
path : ./demo-dist
172
173
173
174
buildRelease :
@@ -192,3 +193,9 @@ jobs:
192
193
193
194
- name : Build release
194
195
run : npm run build:release
196
+
197
+ - name : Upload npm folder
198
+ uses : actions/upload-pages-artifact@v1
199
+ with :
200
+ name : npmDist
201
+ path : ./
Original file line number Diff line number Diff line change
1
+ name : Publish to NPM
2
+ on :
3
+ push :
4
+ tags :
5
+ - ' v[0-9]+.[0-9]+.[0-9]+*'
6
+ permissions : {}
7
+ jobs :
8
+ ci :
9
+ permissions :
10
+ contents : read # for actions/checkout
11
+ security-events : write # for codeql-action
12
+ uses : ./.github/workflows/ci.yml
13
+
14
+ npm-publish :
15
+ environment :
16
+ name : npm-publish
17
+ url : https://www.npmjs.com/package/graphql-voyager/v/${GITHUB_REF/refs\/tags\//}
18
+ needs : ci
19
+ permissions :
20
+ contents : read # for actions/checkout
21
+ runs-on : ubuntu-latest
22
+ steps :
23
+ - name : Checkout repo
24
+ uses : actions/checkout@v3
25
+ with :
26
+ persist-credentials : false
27
+
28
+ - name : Setup Node.js
29
+ uses : actions/setup-node@v3
30
+ with :
31
+ cache : npm
32
+ node-version-file : ' .node-version'
33
+ # 'registry-url' is required for 'npm publish'
34
+ registry-url : ' https://registry.npmjs.org'
35
+
36
+ - uses : actions/download-artifact@v3
37
+ with :
38
+ name : npmDist
39
+ path : npmDist
40
+
41
+ - name : Publish package on NPM
42
+ run : npm publish ./npmDist
43
+ env :
44
+ NODE_AUTH_TOKEN : ${{ secrets.NPM_TOKEN }}
Original file line number Diff line number Diff line change 23
23
- name : Deploy to GitHub Pages
24
24
id : deployment
25
25
uses : actions/deploy-pages@v2
26
+ with :
27
+ artifact_name : demoDist
You can’t perform that action at this time.
0 commit comments