File tree 1 file changed +16
-2
lines changed
1 file changed +16
-2
lines changed Original file line number Diff line number Diff line change @@ -12,12 +12,26 @@ jobs:
12
12
yarn
13
13
yarn run build
14
14
yarn run codegen
15
+ - id : version
16
+ if : startsWith(github.ref, 'refs/tags/v')
17
+ run : echo "::set-output name=version::${GITHUB_REF##refs/tags/v}"
15
18
- name : Publish NPM package
16
19
if : startsWith(github.ref, 'refs/tags/v')
17
20
env :
18
21
NPM_TOKEN : ${{secrets.NPM_TOKEN}}
19
22
run : |
20
- npm version --no-git-tag-version "${GITHUB_REF##refs/tags/ }"
21
- echo "$NPM_TOKEN" > .npmrc
23
+ npm version --no-git-tag-version "${{steps.version.outputs.version} }"
24
+ echo "//registry.npmjs.org/:_authToken= $NPM_TOKEN" > .npmrc
22
25
npm publish --access public
23
26
rm .npmrc
27
+ - name : Github Release
28
+ if : startsWith(github.ref, 'refs/tags/v')
29
+ uses : actions/create-release@v1
30
+ env :
31
+ GITHUB_TOKEN : ${{secrets.GITHUB_TOKEN}}
32
+ with :
33
+ tag_name : v${{steps.version.outputs.version}}
34
+ release_name : v${{steps.version.outputs.version}}
35
+ body : |
36
+ ## NPM Package
37
+ https://www.npmjs.com/package/graphql-codegen-golang/v/$${{steps.version.outputs.version}}
You can’t perform that action at this time.
0 commit comments