File tree Expand file tree Collapse file tree 1 file changed +38
-0
lines changed Expand file tree Collapse file tree 1 file changed +38
-0
lines changed Original file line number Diff line number Diff line change
1
+ env : {}
2
+
3
+ # DO NOT EDIT BELOW, USE: npx ghat fregante/ghatemplates/npm-publish
4
+
5
+ # Collaborators can publish a new version of what's on master via "workflow_dispatch"
6
+ # https://github.blog/changelog/2020-07-06-github-actions-manual-triggers-with-workflow_dispatch/
7
+
8
+ name : Publish
9
+
10
+ on :
11
+ workflow_dispatch :
12
+ inputs :
13
+ Version :
14
+ description : ' Version accepted by `npm version *`'
15
+ required : true
16
+
17
+ jobs :
18
+ NPM :
19
+ runs-on : ubuntu-latest
20
+ steps :
21
+ - uses : actions/checkout@v2
22
+ with :
23
+ fetch-depth : 20
24
+ - uses : actions/setup-node@v1
25
+ with :
26
+ node-version : 14.x
27
+ registry-url : ' https://registry.npmjs.org'
28
+ - run : npm ci || npm install
29
+ - uses : fregante/setup-git-user@v1
30
+ - run : npm version ${{ github.event.inputs.Version }}
31
+ - run : npm publish
32
+ env :
33
+ NODE_AUTH_TOKEN : ${{ secrets.NPM_TOKEN }}
34
+ - run : git push --follow-tags
35
+ - uses : notlmn/release-with-changelog@v3
36
+ with :
37
+ token : ${{ secrets.GITHUB_TOKEN }}
38
+ exclude : true
You can’t perform that action at this time.
0 commit comments