Skip to content

Commit 323313a

Browse files
committed
feat!: parameterize generation of the HTTP client
1 parent 07d0a72 commit 323313a

30 files changed

+1032
-3245
lines changed

.eslintrc.js

Lines changed: 0 additions & 11 deletions
This file was deleted.

.github/workflows/cicd.yaml

Lines changed: 9 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -14,24 +14,25 @@ on:
1414
workflow_dispatch:
1515

1616
concurrency:
17-
group: cicd-${{ github.ref }}
17+
group: ${{ github.workflow }}-${{ github.ref }}
1818
cancel-in-progress: true
1919

2020
jobs:
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 }}

.gitignore

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
node_modules/
22
*.tsbuildinfo
33
*.log
4-
/dist/
5-
/pkg/*/graphql.go
6-
/pkg/*/schema.graphql
7-
!/pkg/graphql/schema.graphql
4+
/packages/*/dist/
5+
/examples/*/graphql.go
6+
/examples/*/schema.graphql
7+
!/examples/graphql/schema.graphql
8+
.turbo/

.npmrc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
//registry.npmjs.org/:_authToken=$NPM_TOKEN
2+
auto-install-peers=true

.prettierignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
/dist/
1+
dist/
22
pnpm-lock.yaml

.vscode/extensions.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
"dbaeumer.vscode-eslint",
44
"esbenp.prettier-vscode",
55
"golang.go",
6-
"redhat.vscode-yaml"
6+
"redhat.vscode-yaml",
7+
"GraphQL.vscode-graphql"
78
]
89
}

.vscode/settings.json

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
{
22
"typescript.tsdk": "node_modules/typescript/lib",
3-
"editor.defaultFormatter": "esbenp.prettier-vscode",
3+
"[css][graphql][html][javascript][javascriptreact][json][jsonc][markdown][mdx][scss][typescript][typescriptreact][yaml]": {
4+
"editor.defaultFormatter": "esbenp.prettier-vscode"
5+
},
46
"editor.formatOnSave": true,
57
"editor.tabSize": 2,
68
"editor.codeActionsOnSave": {
@@ -11,5 +13,6 @@
1113
"**/*.json": "jsonc"
1214
},
1315
"files.eol": "\n",
14-
"files.insertFinalNewline": true
16+
"files.insertFinalNewline": true,
17+
"cSpell.words": ["codegen", "pnpm", "nvmrc", "rickandmorty", "liquidjs"]
1518
}

README.md

Lines changed: 0 additions & 53 deletions
This file was deleted.

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
./packages/graphql-codegen-golang/README.md

examples/go.mod

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
module examples
2+
3+
go 1.18

0 commit comments

Comments
 (0)