@@ -106,12 +106,48 @@ jobs:
106106 echo "Saving SDK_VERSION for later"
107107 cat packages/core/src/version.ts | awk -F"'" '{print $2}' > dist-serverless/version
108108 [ ! -z $(cat dist-serverless/version) ] && echo SDK_VERSION=$(cat dist-serverless/version) || (echo "Version extraction failed" && exit 1)
109-
110109 outputs :
111110 # this needs to be passed on, because the `needs` context only looks at direct ancestors (so steps which depend on
112111 # `job_build` can't see `job_install_deps` and what it returned)
113112 dependency_cache_key : ${{ needs.job_install_deps.outputs.dependency_cache_key }}
114113
114+ job_build_aws_lambda_layer :
115+ name : Build AWS Lambda Layer
116+ needs : job_build
117+ runs-on : ubuntu-latest
118+ steps :
119+ - name : Check out current commit (${{ env.HEAD_COMMIT }})
120+ uses : actions/checkout@v2
121+ with :
122+ ref : ${{ env.HEAD_COMMIT }}
123+ - name : Set up Node
124+ uses : actions/setup-node@v1
125+ with :
126+ node-version : ${{ env.DEFAULT_NODE_VERSION }}
127+ - name : Check dependency cache
128+ uses : actions/cache@v2
129+ with :
130+ path : ${{ env.CACHED_DEPENDENCY_PATHS }}
131+ key : ${{ needs.job_build.outputs.dependency_cache_key }}
132+ - name : Check build cache
133+ uses : actions/cache@v2
134+ with :
135+ path : ${{ env.CACHED_BUILD_PATHS }}
136+ key : ${{ env.BUILD_CACHE_KEY }}
137+ - name : Get SDK version
138+ run : |
139+ export SDK_VERSION=$(cat dist-serverless/version)
140+ echo "SDK_VERSION=$SDK_VERSION" | tee -a $GITHUB_ENV
141+ - uses : actions/upload-artifact@v3
142+ with :
143+ name : ${{ env.HEAD_COMMIT }}
144+ path : |
145+ dist-serverless/*
146+ - uses : getsentry/action-build-aws-lambda-extension@v1
147+ with :
148+ artifact_name : ${{ env.HEAD_COMMIT }}
149+ zip_file_name : sentry-node-serverless-${{ env.SDK_VERSION }}.zip
150+
115151 job_size_check :
116152 name : Size Check
117153 needs : job_build
@@ -508,40 +544,3 @@ jobs:
508544 run : |
509545 cd packages/node-integration-tests
510546 yarn test
511-
512- job_build_aws_lambda_layer :
513- name : Build AWS Lambda Layer
514- needs : job_build
515- runs-on : ubuntu-latest
516- steps :
517- - name : Check out current commit (${{ env.HEAD_COMMIT }})
518- uses : actions/checkout@v2
519- with :
520- ref : ${{ env.HEAD_COMMIT }}
521- - name : Set up Node
522- uses : actions/setup-node@v1
523- with :
524- node-version : ${{ env.DEFAULT_NODE_VERSION }}
525- - name : Check dependency cache
526- uses : actions/cache@v2
527- with :
528- path : ${{ env.CACHED_DEPENDENCY_PATHS }}
529- key : ${{ needs.job_build.outputs.dependency_cache_key }}
530- - name : Check build cache
531- uses : actions/cache@v2
532- with :
533- path : ${{ env.CACHED_BUILD_PATHS }}
534- key : ${{ env.BUILD_CACHE_KEY }}
535- - name : Get SDK version
536- run : |
537- export SDK_VERSION=$(cat dist-serverless/version)
538- echo "SDK_VERSION=$SDK_VERSION" | tee -a $GITHUB_ENV
539- - uses : actions/upload-artifact@v3
540- with :
541- name : ${{ env.HEAD_COMMIT }}
542- path : |
543- dist-serverless/*
544- - uses : getsentry/action-build-aws-lambda-extension@v1
545- with :
546- artifact_name : ${{ env.HEAD_COMMIT }}
547- zip_file_name : sentry-node-serverless-${{ env.SDK_VERSION }}.zip
0 commit comments