File tree Expand file tree Collapse file tree 3 files changed +11
-4
lines changed
Expand file tree Collapse file tree 3 files changed +11
-4
lines changed Original file line number Diff line number Diff line change 1111 runs-on : ubuntu-latest
1212 strategy :
1313 matrix :
14- node-version : [20.x]
14+ node-version : [20.x, 22.x ]
1515 steps :
1616 - uses : actions/checkout@v2
1717 - name : Use Node.js ${{ matrix.node-version }}
Original file line number Diff line number Diff line change @@ -31,3 +31,9 @@ To see how your function would respond once deployed.
3131### Testing
3232
3333` npm test ` will run all tests in the /tests folder.
34+
35+ ## Deployment
36+
37+ You can run ` npm run deploy ` to deploy the current latest version. You should be authenticated with the gcloud CLI to do this.
38+
39+ You can also run ` npm run deploy20 ` to deploy node version 20 if you prefer.
Original file line number Diff line number Diff line change 11{
22 "name" : " ts-template" ,
3- "version" : " 1.3 .0" ,
3+ "version" : " 1.4 .0" ,
44 "description" : " A typescript function which is a template for building cloud functions on GCP quickly." ,
55 "repository" : " jgunnink/typescript-cloud-function-template" ,
66 "main" : " dist/index.js" ,
77 "scripts" : {
88 "start" : " npx tsc-watch --onSuccess 'npx @google-cloud/functions-framework --target=helloWorld'" ,
9- "deploy" : " gcloud functions deploy ts-template --gen2 --runtime=nodejs20 --trigger-http --allow-unauthenticated --region australia-southeast1 --entry-point=helloWorld" ,
9+ "deploy" : " gcloud functions deploy ts-template --gen2 --runtime=nodejs22 --trigger-http --allow-unauthenticated --region australia-southeast1 --entry-point=helloWorld" ,
10+ "deploy20" : " gcloud functions deploy ts-template --gen2 --runtime=nodejs20 --trigger-http --allow-unauthenticated --region australia-southeast1 --entry-point=helloWorld" ,
1011 "build" : " npx tsc" ,
1112 "test" : " env TS_NODE_COMPILER_OPTIONS='{\" module\" : \" commonjs\" }' nyc --reporter=lcov mocha -r ts-node/register 'tests/**/*.ts'"
1213 },
1314 "engines" : {
14- "node" : " >=20.0.0 <21 .0.0"
15+ "node" : " >=20.0.0 <23 .0.0"
1516 },
1617 "author" : " JK Gunnink" ,
1718 "license" : " MIT" ,
You can’t perform that action at this time.
0 commit comments