|
10 | 10 |
|
11 | 11 | env: |
12 | 12 | COMMERCIAL_REGIONS: us-east-1, us-east-2, us-west-1, us-west-2, ap-south-1, ap-northeast-3, ap-northeast-2, ap-southeast-1, ap-southeast-2, ap-northeast-1, ca-central-1, eu-central-1, eu-west-1, eu-west-2, eu-west-3, eu-north-1, sa-east-1 |
13 | | - # LAYER_NAME: AWSOpenTelemetryDistroPython |
14 | | - LAYER_NAME: AWSOpenTelemetryDistroPythonBeta |
| 13 | + LAYER_NAME: AWSOpenTelemetryDistroPython |
15 | 14 |
|
16 | 15 | permissions: |
17 | 16 | id-token: write |
|
56 | 55 | needs: build-layer |
57 | 56 | strategy: |
58 | 57 | matrix: |
59 | | - # aws_region: ${{ fromJson(github.event.inputs.aws_region) }} |
60 | 58 | aws_region: ${{ fromJson(needs.build-layer.outputs.aws_regions_json) }} |
61 | 59 | steps: |
62 | 60 | - name: role arn |
@@ -112,7 +110,6 @@ jobs: |
112 | 110 | mkdir ${{ env.LAYER_NAME }} |
113 | 111 | echo $layerARN > ${{ env.LAYER_NAME }}/${{ matrix.aws_region }} |
114 | 112 | cat ${{ env.LAYER_NAME }}/${{ matrix.aws_region }} |
115 | | - pwd |
116 | 113 | - name: public layer |
117 | 114 | run: | |
118 | 115 | layerVersion=$( |
@@ -193,21 +190,39 @@ jobs: |
193 | 190 | run: | |
194 | 191 | git config user.name "github-actions[bot]" |
195 | 192 | git config user.email "github-actions[bot]@users.noreply.github.com" |
196 | | - git checkout -b "release-lambda-${{ github.run_id }}" |
197 | 193 | mv layer.tf lambda-layer/terraform/lambda/ |
198 | 194 | git add lambda-layer/terraform/lambda/layer.tf |
199 | 195 | git commit -m "Update Lambda layer ARNs for releasing" || echo "No changes to commit" |
200 | | - git push --set-upstream origin "release-lambda-${{ github.run_id }}" |
201 | | - - name: Create Pull Request |
| 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 |
| 219 | + id: create_release |
| 220 | + uses: actions/create-release@v1 |
202 | 221 | env: |
203 | 222 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
204 | | - uses: peter-evans/create-pull-request@v5 |
205 | 223 | with: |
206 | | - token: ${{ secrets.GITHUB_TOKEN }} |
207 | | - commit-message: "Update Lambda layer ARNs for releasing" |
208 | | - title: "Update Layer layer ARNs for releasing" |
209 | | - body: | |
210 | | - This PR updates the layer.tf file for the AWS region `${{ matrix.aws_region }}`. |
211 | | - branch: release-lambda-${{ github.run_id }} |
212 | | - base: main |
213 | | - |
| 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 |
0 commit comments