File tree 5 files changed +23
-9
lines changed
5 files changed +23
-9
lines changed Original file line number Diff line number Diff line change @@ -14,12 +14,26 @@ jobs:
14
14
NODE_ENV : dev
15
15
PR_NUMBER : ${{ inputs.prNumber }}
16
16
steps :
17
+ # Since we are manually triggering the workflow the previous checkout has the main branch. In order to checkout the branch/code of the PR
18
+ # we need first to use the PR number to retrieve the PR SHA number. This means we need three steps to: checkout the repo,
19
+ # run a custom script to get the SHA, and then finally checkout the PR branch
17
20
- name : Checkout Repo
18
21
uses : actions/checkout@v3
22
+ - name : Extract PR details
23
+ id : extract_PR_details
24
+ uses : actions/github-script@v6
25
+ with :
26
+ script : |
27
+ const script = require('.github/scripts/get_pr_info.js');
28
+ await script({github, context, core});
29
+ - name : Checkout PR code
30
+ uses : actions/checkout@v3
31
+ with :
32
+ ref : ${{ steps.extract_PR_details.outputs.headSHA }}
19
33
- name : Packages size report
20
34
21
35
with :
22
- build-command : mkdir dist && npm run package -w packages/logger -w packages/tracer -w packages/metrics && npm run package-bundle -w packages/logger -w packages/tracer -w packages/metrics && bash -c "mv ./packages/*/dist/* dist/" && ls dist
36
+ build-command : mkdir dist && npm run package -w packages/logger -w packages/tracer -w packages/metrics -w packages/commons && npm run package-bundle -w packages/logger -w packages/tracer -w packages/metrics -w packages/commons && bash -c "mv ./packages/*/dist/* dist/" && ls dist
23
37
dist-directory : /dist
24
38
pr-number : ${{ inputs.prNumber }}
25
39
env :
Original file line number Diff line number Diff line change 19
19
"lint" : " eslint --ext .ts --fix --no-error-on-unmatched-pattern src tests" ,
20
20
"format" : " eslint --fix --ext .ts --fix --no-error-on-unmatched-pattern src tests" ,
21
21
"package" : " mkdir -p dist/ && npm pack && mv *.tgz dist/" ,
22
- "package-bundle" : " ../../package-bundler.sh ${LERNA_PACKAGE_NAME} -bundle ./dist/ " ,
22
+ "package-bundle" : " ../../package-bundler.sh commons -bundle ./dist" ,
23
23
"prepare" : " npm run build" ,
24
24
"prepublishOnly" : " npm test && npm run lint" ,
25
25
"preversion" : " npm run lint" ,
48
48
" serverless" ,
49
49
" nodejs"
50
50
]
51
- }
51
+ }
Original file line number Diff line number Diff line change 22
22
"lint" : " eslint --ext .ts --fix --no-error-on-unmatched-pattern src tests" ,
23
23
"format" : " eslint --fix --ext .ts --fix --no-error-on-unmatched-pattern src tests" ,
24
24
"package" : " mkdir -p dist/ && npm pack && mv *.tgz dist/" ,
25
- "package-bundle" : " ../../package-bundler.sh ${LERNA_PACKAGE_NAME} -bundle ./dist/ " ,
25
+ "package-bundle" : " ../../package-bundler.sh logger -bundle ./dist" ,
26
26
"prepare" : " npm run build" ,
27
27
"prepublishOnly" : " npm test && npm run lint" ,
28
28
"preversion" : " npm run lint" ,
64
64
" serverless" ,
65
65
" nodejs"
66
66
]
67
- }
67
+ }
Original file line number Diff line number Diff line change 22
22
"lint" : " eslint --ext .ts --fix --no-error-on-unmatched-pattern src tests" ,
23
23
"format" : " eslint --fix --ext .ts --fix --no-error-on-unmatched-pattern src tests" ,
24
24
"package" : " mkdir -p dist/ && npm pack && mv *.tgz dist/" ,
25
- "package-bundle" : " ../../package-bundler.sh ${LERNA_PACKAGE_NAME} -bundle ./dist/ " ,
25
+ "package-bundle" : " ../../package-bundler.sh metrics -bundle ./dist" ,
26
26
"prepare" : " npm run build" ,
27
27
"prepublishOnly" : " npm test && npm run lint" ,
28
28
"preversion" : " npm run lint" ,
59
59
" serverless" ,
60
60
" nodejs"
61
61
]
62
- }
62
+ }
Original file line number Diff line number Diff line change 27
27
"version" : " npm run format && git add -A src" ,
28
28
"postversion" : " git push && git push --tags" ,
29
29
"package" : " mkdir -p dist/ && npm pack && mv *.tgz dist/" ,
30
- "package-bundle" : " ../../package-bundler.sh ${LERNA_PACKAGE_NAME} -bundle ./dist/ "
30
+ "package-bundle" : " ../../package-bundler.sh tracer -bundle ./dist"
31
31
},
32
32
"homepage" : " https://github.com/awslabs/aws-lambda-powertools-typescript/tree/master/packages/tracer#readme" ,
33
33
"license" : " MIT-0" ,
62
62
" serverless" ,
63
63
" nodejs"
64
64
]
65
- }
65
+ }
You can’t perform that action at this time.
0 commit comments