Skip to content

build(deps): bump the opentelemetry-deps-python group across 3 direct… #23

build(deps): bump the opentelemetry-deps-python group across 3 direct…

build(deps): bump the opentelemetry-deps-python group across 3 direct… #23

name: "Release NodeJS Lambda Layer"
on:
# (Using tag push instead of release to allow filtering by tag prefix.)
push:
tags:
- layer-nodejs/**
permissions:
contents: read
jobs:
create-release:
permissions:
contents: write
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
- name: Create Release
run: gh release create ${{ github.ref_name }} --draft --title ${{ github.ref_name }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
build-layer:
permissions:
contents: write
runs-on: ubuntu-latest
needs: create-release
outputs:
NODEJS_VERSION: ${{ steps.save-node-sdk-version.outputs.SDK_VERSION}}
steps:
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
- uses: actions/setup-node@395ad3262231945c25e8478fd5baf05154b1d79f # v6.1.0
with:
node-version: 18
- name: Build
run: |
npm install
npm run build
working-directory: nodejs
- name: Save Node SDK Version
id: save-node-sdk-version
run: |
SDK_VERSION=$(npm list @opentelemetry/core --depth=0 | grep @opentelemetry/core | sed 's/^.*@//')
echo "SDK_VERSION=$SDK_VERSION" >> $GITHUB_OUTPUT
working-directory: nodejs/packages/layer/scripts
- name: Rename zip file
run: mv layer.zip opentelemetry-nodejs-layer.zip
working-directory: nodejs/packages/layer/build
- uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0
name: Save assembled layer to build
with:
name: opentelemetry-nodejs-layer.zip
path: nodejs/packages/layer/build/opentelemetry-nodejs-layer.zip
- name: Add Binary to Release
run: |
gh release upload ${{github.ref_name}} nodejs/packages/layer/build/opentelemetry-nodejs-layer.zip
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
publish-layer:
permissions: # required by the reusable workflow
contents: read
id-token: write
uses: ./.github/workflows/layer-publish.yml
needs: build-layer
strategy:
matrix:
aws_region:
- ap-northeast-1
- ap-northeast-2
- ap-south-1
- ap-southeast-1
- ap-southeast-2
- ca-central-1
- eu-central-1
- eu-north-1
- eu-west-1
- eu-west-2
- eu-west-3
- sa-east-1
- us-east-1
- us-east-2
- us-west-1
- us-west-2
with:
artifact-name: opentelemetry-nodejs-layer.zip
layer-name: opentelemetry-nodejs
component-version: ${{needs.build-layer.outputs.NODEJS_VERSION}}
# architecture:
# If you add a nodejs runtime here, please make sure that the collector/Makefile publish and publish-layer targets
# get updated as well
runtimes: nodejs20.x nodejs22.x nodejs24.x
release-group: prod
aws_region: ${{ matrix.aws_region }}
secrets: inherit