1414 workflow_dispatch :
1515
1616concurrency :
17- group : cicd -${{ github.ref }}
17+ group : ${{ github.workflow }} -${{ github.ref }}
1818 cancel-in-progress : true
1919
2020jobs :
2121 build :
2222 runs-on : ubuntu-latest
2323 steps :
24- - uses : actions/checkout@a12a3943b4bdde767164f792f33f40b04645d846 # tag= v3
25- - uses : actions/setup-node@9ced9a43a244f3ac94f13bfd896db8c8f30da67a # tag= v3
24+ - uses : actions/checkout@v3
25+ - uses : actions/setup-node@v3
2626 with :
2727 node-version-file : .nvmrc
2828
2929 - name : Install & Build & Test
3030 run : |
3131 corepack enable
32- pnpm install --frozen-lockfile --strict-peer-dependencies
32+ pnpm install --frozen-lockfile
3333 pnpm run build
34- pnpm run gen
34+ pnpm run gen:rickandmorty
35+ pnpm run test:rickandmorty
3536
3637 - name : Compute package version
3738 id : version
@@ -40,22 +41,17 @@ jobs:
4041
4142 - name : Publish NPM package
4243 if : startsWith(github.ref, 'refs/tags/v')
44+ working-directory : packages/graphql-codegen-golang
4345 env :
4446 NPM_TOKEN : ${{ secrets.NPM_TOKEN }}
4547 run : |
4648 npm version --no-git-tag-version '${{ steps.version.outputs.version }}'
47- echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" > .npmrc
48- npm publish --access public
49- rm .npmrc
49+ pnpm publish --access public
5050
5151 - name : Github Release
5252 if : startsWith(github.ref, 'refs/tags/v')
53- uses : actions/create-release@0cb9c9b65d5d1901c1f53e5e66eaf4afd303e70e # tag=v1
54- env :
55- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
53+ uses : softprops/action-gh-release@v1
5654 with :
57- tag_name : v${{ steps.version.outputs.version }}
58- release_name : v${{ steps.version.outputs.version }}
5955 body : |
6056 ## NPM Package
6157 https://www.npmjs.com/package/graphql-codegen-golang/v/${{ steps.version.outputs.version }}
0 commit comments