File tree 4 files changed +51
-4
lines changed
4 files changed +51
-4
lines changed Original file line number Diff line number Diff line change
1
+ name : Publish package to GitHub Packages
2
+ on :
3
+ release :
4
+ types : [published]
5
+ jobs :
6
+ build :
7
+ runs-on : ubuntu-latest
8
+ permissions :
9
+ contents : read
10
+ packages : write
11
+ steps :
12
+ - uses : actions/checkout@v4
13
+ with :
14
+ fetch-depth : 0
15
+
16
+ - name : Install Node
17
+ uses : actions/setup-node@v4
18
+ with :
19
+ node-version-file : .nvmrc
20
+ cache : yarn
21
+
22
+ - name : Install JavaScript dependencies
23
+ shell : bash
24
+ run : yarn install
25
+
26
+ - name : Build clients
27
+ shell : bash
28
+ run : yarn build
29
+
30
+ - name : Publish to NPM
31
+ shell : bash
32
+ run : yarn release:publish
33
+ env :
34
+ NPM_AUTH_TOKEN : ${{ secrets.CLINIA_CI_GITHUB_TOKEN }}
Original file line number Diff line number Diff line change 8
8
"scripts" : {
9
9
"build" : " lerna run build --skip-nx-cache --include-dependencies" ,
10
10
"clean" : " lerna run clean --include-dependencies" ,
11
- "release:publish" : " tsc --project tsconfig.script. json && node dist/ scripts/publish.js" ,
11
+ "release:publish" : " tsc --project scripts/ tsconfig.json && node scripts/dist /publish.js" ,
12
12
"test" : " lerna run test $*" ,
13
13
"test:size" : " bundlewatch"
14
14
},
25
25
"yarn" : " ^4.0.0"
26
26
},
27
27
"packageManager" :
" [email protected] "
28
- }
28
+ }
Original file line number Diff line number Diff line change
1
+ import { execaCommand } from 'execa' ;
2
+
3
+ async function publish ( ) : Promise < void > {
4
+ // publish the stable public packages
5
+ await execaCommand (
6
+ `yarn lerna exec --no-bail -- npm_config_registry=https://npm.pkg.github.com/ npm publish --access public` ,
7
+ {
8
+ shell : 'bash' ,
9
+ } ,
10
+ ) ;
11
+ }
12
+
13
+ publish ( ) ;
Original file line number Diff line number Diff line change 1
1
{
2
- "extends" : " ./tsconfig.json" ,
2
+ "extends" : " .. /tsconfig.json" ,
3
3
"compilerOptions" : {
4
4
"resolveJsonModule" : true ,
5
5
"outDir" : " dist"
6
6
},
7
- "include" : [" scripts " ]
7
+ "include" : [" *.ts " ]
8
8
}
You can’t perform that action at this time.
0 commit comments