diff --git a/.github/workflows/release-lambda.yml b/.github/workflows/release-lambda.yml index e887d1d1e..1706fbfc6 100644 --- a/.github/workflows/release-lambda.yml +++ b/.github/workflows/release-lambda.yml @@ -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) @@ -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 @@ -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