4949 pip install tox
5050 tox
5151 - name : upload layer
52- uses : actions/upload-artifact@v3
52+ uses : actions/upload-artifact@v4
5353 with :
5454 name : layer.zip
5555 path : lambda-layer/src/build/aws-opentelemetry-python-layer.zip
9090 run : |
9191 echo BUCKET_NAME=python-lambda-layer-${{ github.run_id }}-${{ matrix.aws_region }} | tee --append $GITHUB_ENV
9292 - name : download layer.zip
93- uses : actions/download-artifact@v3
93+ uses : actions/download-artifact@v4
9494 with :
9595 name : layer.zip
9696 - name : publish
@@ -128,7 +128,7 @@ jobs:
128128 --action lambda:GetLayerVersion
129129 - name : upload layer arn artifact
130130 if : ${{ success() }}
131- uses : actions/upload-artifact@v3
131+ uses : actions/upload-artifact@v4
132132 with :
133133 name : ${{ env.LAYER_NAME }}
134134 path : ${{ env.LAYER_NAME }}/${{ matrix.aws_region }}
@@ -144,7 +144,7 @@ jobs:
144144 uses : actions/checkout@v4
145145 - uses : hashicorp/setup-terraform@v2
146146 - name : download layerARNs
147- uses : actions/download-artifact@v3
147+ uses : actions/download-artifact@v4
148148 with :
149149 name : ${{ env.LAYER_NAME }}
150150 path : ${{ env.LAYER_NAME }}
@@ -183,17 +183,33 @@ jobs:
183183 terraform fmt layer.tf
184184 cat layer.tf
185185 - name : upload layer tf file
186- uses : actions/upload-artifact@v3
186+ uses : actions/upload-artifact@v4
187187 with :
188188 name : layer.tf
189189 path : layer.tf
190+ - name : Get commit hash
191+ id : commit
192+ run : echo "sha_short=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
193+ - name : Create Release Notes
194+ run : |
195+ echo "AWS OpenTelemetry Lambda Layer for Python version ${{ github.event.inputs.version }}-${{ steps.commit.outputs.sha_short }}" > release_notes.md
196+ echo "" >> release_notes.md
197+ echo "" >> release_notes.md
198+ echo "See new Lambda Layer ARNs:" >> release_notes.md
199+ echo "" >> release_notes.md
200+ cat layer-note >> release_notes.md
201+ echo "" >> release_notes.md
202+ echo "Notes:" >> release_notes.md
190203 - name : Create GH release
191204 id : create_release
192205 env :
193206 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token
194207 run : |
195208 gh release create --target "$GITHUB_REF_NAME" \
196- --title "Release lambda-v${{ github.event.inputs.version }}" \
209+ --title "Release lambda-v${{ github.event.inputs.version }}-${{ steps.commit.outputs.sha_short }}" \
210+ --notes-file release_notes.md \
197211 --draft \
198- "lambda-v${{ github.event.inputs.version }}" \
212+ "lambda-v${{ github.event.inputs.version }}-${{ steps.commit.outputs.sha_short }} " \
199213 layer.tf
214+ echo Removing release_notes.md ...
215+ rm -f release_notes.md
0 commit comments