File tree Expand file tree Collapse file tree 1 file changed +16
-2
lines changed Expand file tree Collapse file tree 1 file changed +16
-2
lines changed Original file line number Diff line number Diff line change @@ -12,12 +12,26 @@ jobs:
1212 yarn
1313 yarn run build
1414 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}"
1518 - name : Publish NPM package
1619 if : startsWith(github.ref, 'refs/tags/v')
1720 env :
1821 NPM_TOKEN : ${{secrets.NPM_TOKEN}}
1922 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
2225 npm publish --access public
2326 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