diff --git a/.github/workflows/release-lambda.yml b/.github/workflows/release-lambda.yml index fa24d648a..4b9b0c388 100644 --- a/.github/workflows/release-lambda.yml +++ b/.github/workflows/release-lambda.yml @@ -27,8 +27,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) @@ -190,8 +192,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 @@ -205,10 +210,10 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token 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