Skip to content

Workflow file for this run

name: Auto Release that generates binary, and upload new layer version to AWS
on:
release:
types: [published]
jobs:
deploy:
runs-on: ubuntu-latest
strategy:
matrix:
aws-region: [ 'us-east-1', 'us-east-2', 'us-west-1', 'us-west-2', 'eu-central-1', 'eu-west-1', 'eu-north-1', 'ap-southeast-2', 'ca-central-1', 'sa-east-1', 'ap-northeast-1', 'ap-southeast-1', 'ap-south-1', 'ap-northeast-3', 'ap-northeast-2', 'eu-west-2', 'eu-west-3' ]
steps:
- uses: actions/checkout@v4
- name: Setup Go 1.22
uses: actions/setup-go@v5
with:
go-version: 1.22
# AMD Build
- name: Build AMD ZIP File
working-directory: ./logzio-lambda-extensions-logs
run: ./build-zip.sh
- name: Setup AWS
uses: aws-actions/configure-aws-credentials@v4
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: ${{ matrix.aws-region }}
- name: Deploy Layer to AWS region ${{ matrix.aws-region }}
working-directory: ./logzio-lambda-extensions-logs/bin
run: |
aws lambda publish-layer-version \
--layer-name LogzioLambdaExtensionLogs \
--description "Extension for shipping Lambda logs to Logz.io ${{ github.event.release.tag_name }}." \
--zip-file "fileb://extension.zip" \
--region ${{ matrix.aws-region }} \
--compatible-runtimes dotnet8 python3.12 provided.al2023 dotnet6 java11 java17 java8.al2 nodejs16.x nodejs18.x python3.10 python3.11 python3.8 python3.9 ruby3.2 provided.al2 \
--compatible-architectures x86_64
# ARM Build
- name: Build ARM ZIP File
working-directory: ./logzio-lambda-extensions-logs
run: chmod +x ./build-arm-zip.sh
- name: Deploy ARM Layer to AWS region ${{ matrix.aws-region }}
working-directory: ./logzio-lambda-extensions-logs/bin
run: |
aws lambda publish-layer-version \
--layer-name LogzioLambdaExtensionLogsArm \
--description "Extension for shipping Lambda logs to Logz.io $ {{ github.event.release.tag_name }}, for arm64 architecture." \
--zip-file "fileb://extension.zip" \
--region ${{ matrix.aws-region }} \
--compatible-runtimes dotnet8 python3.12 provided.al2023 dotnet6 java11 java17 java8.al2 nodejs16.x nodejs18.x python3.10 python3.11 python3.8 python3.9 ruby3.2 provided.al2 \
--compatible-architectures arm64