File tree Expand file tree Collapse file tree 5 files changed +55
-17
lines changed Expand file tree Collapse file tree 5 files changed +55
-17
lines changed Original file line number Diff line number Diff line change
1
+ name : Publish NPM Package
2
+
3
+ on :
4
+ release :
5
+ types : [published]
6
+
7
+ jobs :
8
+ publish :
9
+ name : Publish on NPM
10
+ runs-on : ubuntu-latest
11
+ steps :
12
+ - name : Checkout
13
+ uses : actions/checkout@v2
14
+ - name : Setup node
15
+ uses : actions/setup-node@v2
16
+ with :
17
+ node-version : 14
18
+ registry-url : https://registry.npmjs.org/
19
+
20
+ - name : Setup Git
21
+ run : |
22
+ git config --local user.email "$(git log --format='%ae' HEAD^!)"
23
+ git config --local user.name "$(git log --format='%an' HEAD^!)"
24
+
25
+ - run : yarn install
26
+ - run : yarn build
27
+
28
+ - name : Publish build from ${{ github.ref }}
29
+ run : |
30
+ version=$(echo $TAG | grep -o -E "[0-9.]+")
31
+ git tag -d "v${version}"
32
+ yarn publish --new-version $version ./lib
33
+ env :
34
+ TAG : ${{ github.ref }}
35
+ NODE_AUTH_TOKEN : ${{ secrets.NPM_TOKEN }}
Original file line number Diff line number Diff line change 8
8
9
9
jobs :
10
10
build :
11
+ name : Build
11
12
runs-on : ubuntu-latest
12
13
13
- strategy :
14
- matrix :
15
- node-version : [12.x, 14.x]
16
-
17
14
steps :
18
- - uses : actions/checkout@v2
19
- - uses : actions/setup-node@v1
15
+ - name : Checkout
16
+ uses : actions/checkout@v2
17
+ - name : Setup node
18
+ uses : actions/setup-node@v2
20
19
with :
21
- node-version : ${{ matrix.node-version }}
20
+ node-version : 14
22
21
23
22
- run : yarn install
24
- - run : yarn run build
23
+ - run : yarn build
25
24
- run : yarn test
Original file line number Diff line number Diff line change @@ -47,7 +47,7 @@ generates:
47
47
- add :
48
48
content : " /** Generated File. Do not modify directly. */"
49
49
- typescript-operations
50
- - typescript-graphql-typed-files-modules/lib/plugin
50
+ - typescript-graphql-typed-files-modules
51
51
config :
52
52
skipTypename : true
53
53
` ` `
Original file line number Diff line number Diff line change 1
1
{
2
- "name" : " apollo-typed-documents" ,
3
- "version" : " 2.0.0" ,
4
- "description" : " Get type safety for your apollo documents." ,
2
+ "name" : " typescript-graphql-typed-files-modules" ,
3
+ "version" : " 0.0.1" ,
4
+ "author" :
" Eric Matte <[email protected] >" ,
5
+ "description" : " Get type safety for your graphql documents." ,
5
6
"keywords" : [
6
7
" module" ,
7
8
" graphql" ,
8
9
" graphql-loader" ,
9
10
" codegen"
10
11
],
11
12
"license" : " MIT" ,
12
- "main" : " lib/plugin .js" ,
13
+ "main" : " index .js" ,
13
14
"files" : [
14
15
" lib"
15
16
],
16
17
"scripts" : {
17
- "build" : " rimraf lib && tsc" ,
18
- "preversion" : " yarn test" ,
19
- "version" : " yarn run build" ,
20
- "postversion" : " git push && git push --tags" ,
18
+ "build" : " rimraf lib && tsc && cp package.json lib/package.json" ,
19
+ "postversion" : " git push --tags -f" ,
21
20
"test" : " jest"
22
21
},
23
22
"dependencies" : {
Original file line number Diff line number Diff line change
1
+ import { plugin } from "./plugin" ;
2
+
3
+ export { plugin } ;
4
+
5
+ export default plugin ;
You can’t perform that action at this time.
0 commit comments