File tree Expand file tree Collapse file tree 5 files changed +55
-11
lines changed Expand file tree Collapse file tree 5 files changed +55
-11
lines changed Original file line number Diff line number Diff line change 11name : Node CI
22
33on :
4- push :
5- branches :
6- - main
7- - master
8- - ' features/*'
4+ workflow_call :
5+ # This gets run by on-merge-main.yml automatically
6+ # push:
7+ # branches:
8+ # - main
9+ # - master
10+ # - 'features/*'
911 pull_request :
1012 branches :
1113 - main
@@ -19,10 +21,10 @@ jobs:
1921 fail-fast : false
2022 matrix :
2123 os : [macos-latest, windows-latest, ubuntu-latest]
22- node-version : [14, 16]
24+ node-version : [14, 16, 18 ]
2325
2426 steps :
25- - uses : actions/checkout@v1
27+ - uses : actions/checkout@v2
2628 - name : Use Node.js ${{ matrix.node-version }}
2729 uses : actions/setup-node@v1
2830 with :
3335 - name : npm install, build, and test
3436 run : |
3537 npm install
36- npm run bootstrap
37- npm run build --if-present
38+ npm run build
3839 npm run test
3940 env :
4041 CI : true
Original file line number Diff line number Diff line change 1+ name : Merge to main
2+
3+ on :
4+ push :
5+ branches :
6+ - main
7+
8+ jobs :
9+ tests :
10+ name : Run tests
11+ uses : twilio-labs/serverless-toolkit/.github/workflows/nodejs.yml@main
12+
13+ release :
14+ name : Run release work
15+ needs : tests
16+ runs-on : ubuntu-latest
17+
18+ steps :
19+ - name : Checkout Repo
20+ uses : actions/checkout@v2
21+ - name : Setup Node.js 16
22+ uses : actions/setup-node@v2
23+ with :
24+ node-version : 16
25+ - name : Update npm to 8.x
26+ run : |
27+ npm i -g npm@8
28+ - name : Install Dependencies
29+ run : npm install
30+ - name : Setup CI Git User
31+ run : |
32+ git config user.name twilio-labs-ci
33+ git config user.email 65686990+twilio-labs-ci@users.noreply.github.com
34+ - name : " Create Pull Request or Publish to npm"
35+ uses : changesets/action@v1
36+ with :
37+ version : npm run version
38+ publish : npm run npm:publish
39+ commit : " chore: version packages"
40+ env :
41+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
42+ NPM_TOKEN : ${{ secrets.NPM_TOKEN }}
Original file line number Diff line number Diff line change 55 "bootstrap" : " npm run build" ,
66 "build" : " npm run build --workspaces --if-present" ,
77 "changeset" : " changeset" ,
8+ "version-packages" : " npm run create-version && npm run version-package --workspaces --if-present" ,
89 "create-version" : " changeset version" ,
910 "npm:publish" : " changeset publish" ,
1011 "cm" : " git-cz" ,
Original file line number Diff line number Diff line change 7575 "scripts" : {
7676 "postpack" : " rm -f oclif.manifest.json" ,
7777 "prepack" : " oclif manifest && oclif readme" ,
78- "version" : " oclif readme && git add README.md"
78+ "version-package " : " oclif readme && git add README.md && git commit -m \" chore(@twilio-labs/plugin-assets): version update in readme \" "
7979 },
8080 "gitHead" : " 6db273648ed19474f4125042556b10c051529912"
8181}
Original file line number Diff line number Diff line change 8888 "scripts" : {
8989 "postpack" : " rm -f oclif.manifest.json" ,
9090 "prepack" : " oclif manifest && oclif readme" ,
91- "version" : " oclif readme && git add README.md"
91+ "version-package " : " oclif readme && git add README.md && git commit -m \" chore(@twilio-labs/plugin-serverless): version update in readme \" "
9292 },
9393 "gitHead" : " 6db273648ed19474f4125042556b10c051529912"
9494}
You can’t perform that action at this time.
0 commit comments