Skip to content
15 changes: 11 additions & 4 deletions .github/workflows/release-lambda.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,10 @@ jobs:
steps:
- name: Set up regions matrix
id: set-matrix
env:
AWS_REGIONS: ${{ github.event.inputs.aws_region }}
run: |
IFS=',' read -ra REGIONS <<< "${{ github.event.inputs.aws_region }}"
IFS=',' read -ra REGIONS <<< "$AWS_REGIONS"
MATRIX="["
for region in "${REGIONS[@]}"; do
trimmed_region=$(echo "$region" | xargs)
Expand Down Expand Up @@ -205,8 +207,11 @@ jobs:
id: commit
run: echo "sha_short=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
- name: Create Release Notes
env:
VERSION: ${{ github.event.inputs.version }}
SHA_SHORT: ${{ steps.commit.outputs.sha_short }}
run: |
echo "AWS OpenTelemetry Lambda Layer for Python version ${{ github.event.inputs.version }}-${{ steps.commit.outputs.sha_short }}" > release_notes.md
echo "AWS OpenTelemetry Lambda Layer for Python version $VERSION-$SHA_SHORT" > release_notes.md
echo "" >> release_notes.md
echo "" >> release_notes.md
echo "See new Lambda Layer ARNs:" >> release_notes.md
Expand All @@ -218,12 +223,14 @@ jobs:
id: create_release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token
VERSION: ${{ github.event.inputs.version }}
SHA_SHORT: ${{ steps.commit.outputs.sha_short }}
run: |
gh release create --target "$GITHUB_REF_NAME" \
--title "Release lambda-v${{ github.event.inputs.version }}-${{ steps.commit.outputs.sha_short }}" \
--title "Release lambda-v$VERSION-$SHA_SHORT" \
--notes-file release_notes.md \
--draft \
"lambda-v${{ github.event.inputs.version }}-${{ steps.commit.outputs.sha_short }}" \
"lambda-v$VERSION-$SHA_SHORT" \
layer_arns.tf layer.zip
echo Removing release_notes.md ...
rm -f release_notes.md
Expand Down
Loading