@@ -3,6 +3,9 @@ name: Release Lambda layer
3
3
on :
4
4
workflow_dispatch :
5
5
inputs :
6
+ version :
7
+ description : The version to tag the lambda release with, e.g., 1.2.0
8
+ required : true
6
9
aws_region :
7
10
description : ' Deploy to aws regions'
8
11
required : true
@@ -184,45 +187,13 @@ jobs:
184
187
with :
185
188
name : layer.tf
186
189
path : layer.tf
187
- # - name: Commit changes
188
- # env:
189
- # GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
190
- # run: |
191
- # git config user.name "github-actions[bot]"
192
- # git config user.email "github-actions[bot]@users.noreply.github.com"
193
- # mv layer.tf lambda-layer/terraform/lambda/
194
- # git add lambda-layer/terraform/lambda/layer.tf
195
- # git commit -m "Update Lambda layer ARNs for releasing" || echo "No changes to commit"
196
- # git push
197
- create-release :
198
- runs-on : ubuntu-latest
199
- needs : generate-release-note
200
- steps :
201
- - name : Checkout Repo @ SHA - ${{ github.sha }}
202
- uses : actions/checkout@v4
203
- - name : Get latest commit SHA
204
- run : |
205
- echo "COMMIT_SHA=${GITHUB_SHA}" >> $GITHUB_ENV
206
- SHORT_SHA=$(echo $GITHUB_SHA | cut -c1-7)
207
- echo "SHORT_SHA=${SHORT_SHA}" >> $GITHUB_ENV
208
- # - name: Create Tag
209
- # run: |
210
- # git config user.name "github-actions[bot]"
211
- # git config user.email "github-actions[bot]@users.noreply.github.com"
212
- # TAG_NAME="lambda-${SHORT_SHA}"
213
- # git tag -a "$TAG_NAME" -m "Release Lambda layer based on commit $TAG_NAME"
214
- # git push origin "$TAG_NAME"
215
- # echo "TAG_NAME=${TAG_NAME}" >> $GITHUB_ENV
216
- # env:
217
- # GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
218
- - name : Create Release
190
+ - name : Create GH release
219
191
id : create_release
220
- uses : actions/create-release@v1
221
192
env :
222
- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
223
- with :
224
- tag_name : ${{ env.TAG_NAME }}
225
- release_name : " Release AWSOpenTelemetryDistroPython Lambda Layer "
226
- body_path : lambda-layer/terraform/lambda/layer.tf
227
- draft : true
228
- prerelease : false
193
+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token
194
+ run : |
195
+ gh release create --target "$GITHUB_REF_NAME" \
196
+ --title "Release lambda-v${{ github.event.inputs.version }}" \
197
+ --draft \
198
+ "lambda-v${{ github.event.inputs.version }}" \
199
+ layer.tf
0 commit comments