Skip to content

Commit 50bd066

Browse files
authored
Update release-lambda.yml
Add Lambda layer artifact in release assets
1 parent 1fae89f commit 50bd066

File tree

1 file changed

+11
-12
lines changed

1 file changed

+11
-12
lines changed

.github/workflows/release-lambda.yml

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -170,23 +170,22 @@ jobs:
170170
- name: generate tf layer
171171
working-directory: ${{ env.LAYER_NAME }}
172172
run: |
173-
echo "locals {" >> ../layer.tf
174-
echo " sdk_layer_arns = {" >> ../layer.tf
173+
echo "locals {" >> ../layer_arns.tf
174+
echo " sdk_layer_arns = {" >> ../layer_arns.tf
175175
for file in *
176176
do
177177
read arn < $file
178-
echo " \""$file"\" = \""$arn"\"" >> ../layer.tf
178+
echo " \""$file"\" = \""$arn"\"" >> ../layer_arns.tf
179179
done
180180
cd ..
181-
echo " }" >> layer.tf
182-
echo "}" >> layer.tf
183-
terraform fmt layer.tf
184-
cat layer.tf
185-
- name: upload layer tf file
186-
uses: actions/upload-artifact@v4
181+
echo " }" >> layer_arns.tf
182+
echo "}" >> layer_arns.tf
183+
terraform fmt layer_arns.tf
184+
cat layer_arns.tf
185+
- name: download layer.zip
186+
uses: actions/download-artifact@v4
187187
with:
188-
name: layer.tf
189-
path: layer.tf
188+
name: layer.zip
190189
- name: Get commit hash
191190
id: commit
192191
run: echo "sha_short=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
@@ -210,6 +209,6 @@ jobs:
210209
--notes-file release_notes.md \
211210
--draft \
212211
"lambda-v${{ github.event.inputs.version }}-${{ steps.commit.outputs.sha_short }}" \
213-
layer.tf
212+
layer_arns.tf layer.zip
214213
echo Removing release_notes.md ...
215214
rm -f release_notes.md

0 commit comments

Comments
 (0)