49
49
pip install tox
50
50
tox
51
51
- name : upload layer
52
- uses : actions/upload-artifact@v3
52
+ uses : actions/upload-artifact@v4
53
53
with :
54
54
name : layer.zip
55
55
path : lambda-layer/src/build/aws-opentelemetry-python-layer.zip
90
90
run : |
91
91
echo BUCKET_NAME=python-lambda-layer-${{ github.run_id }}-${{ matrix.aws_region }} | tee --append $GITHUB_ENV
92
92
- name : download layer.zip
93
- uses : actions/download-artifact@v3
93
+ uses : actions/download-artifact@v4
94
94
with :
95
95
name : layer.zip
96
96
- name : publish
@@ -128,7 +128,7 @@ jobs:
128
128
--action lambda:GetLayerVersion
129
129
- name : upload layer arn artifact
130
130
if : ${{ success() }}
131
- uses : actions/upload-artifact@v3
131
+ uses : actions/upload-artifact@v4
132
132
with :
133
133
name : ${{ env.LAYER_NAME }}
134
134
path : ${{ env.LAYER_NAME }}/${{ matrix.aws_region }}
@@ -144,7 +144,7 @@ jobs:
144
144
uses : actions/checkout@v4
145
145
- uses : hashicorp/setup-terraform@v2
146
146
- name : download layerARNs
147
- uses : actions/download-artifact@v3
147
+ uses : actions/download-artifact@v4
148
148
with :
149
149
name : ${{ env.LAYER_NAME }}
150
150
path : ${{ env.LAYER_NAME }}
@@ -183,17 +183,33 @@ jobs:
183
183
terraform fmt layer.tf
184
184
cat layer.tf
185
185
- name : upload layer tf file
186
- uses : actions/upload-artifact@v3
186
+ uses : actions/upload-artifact@v4
187
187
with :
188
188
name : layer.tf
189
189
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
190
203
- name : Create GH release
191
204
id : create_release
192
205
env :
193
206
GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token
194
207
run : |
195
208
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 \
197
211
--draft \
198
- "lambda-v${{ github.event.inputs.version }}" \
212
+ "lambda-v${{ github.event.inputs.version }}-${{ steps.commit.outputs.sha_short }} " \
199
213
layer.tf
214
+ echo Removing release_notes.md ...
215
+ rm -f release_notes.md
0 commit comments