Skip to content

Commit 491e2f8

Browse files
author
Dakshit Babbar
committed
Update Release Automation Workflow
1 parent 530884a commit 491e2f8

File tree

2 files changed

+34
-52
lines changed

2 files changed

+34
-52
lines changed

.github/workflows/tag-and-zip.yml renamed to .github/workflows/release-automation.yml

Lines changed: 34 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Tag, Deploy Docs, and Create ZIP
1+
name: Release Automation
22

33
on:
44
workflow_dispatch:
@@ -58,7 +58,7 @@ jobs:
5858
env:
5959
VERSION_NUMBER: ${{ github.event.inputs.version_number }}
6060
run: |
61-
zip -r aws-iot-device-sdk-embedded-C-$"VERSION_NUMBER".zip aws-iot-device-sdk-embedded-C -x "*.git*"
61+
zip -r aws-iot-device-sdk-embedded-C-"$VERSION_NUMBER".zip aws-iot-device-sdk-embedded-C -x "*.git*"
6262
ls ./
6363
- name: Validate created ZIP
6464
env:
@@ -158,3 +158,35 @@ jobs:
158158
exit 1
159159
fi
160160
output_dir: html
161+
create-release:
162+
needs:
163+
- create-zip
164+
- deploy-docs
165+
name: Create Release and Upload Release Asset
166+
runs-on: ubuntu-20.04
167+
steps:
168+
- name: Create Release
169+
id: create_release
170+
uses: actions/create-release@v1
171+
env:
172+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
173+
with:
174+
tag_name: ${{ github.event.inputs.version_number }}
175+
release_name: ${{ github.event.inputs.version_number }}
176+
body: Release version ${{ github.event.inputs.version_number }} of the AWS IoT Device SDK for Embedded C.
177+
draft: false
178+
prerelease: false
179+
- name: Download ZIP artifact
180+
uses: actions/download-artifact@v4
181+
with:
182+
name: aws-iot-device-sdk-embedded-C-${{ github.event.inputs.version_number }}.zip
183+
- name: Upload Release Asset
184+
id: upload-release-asset
185+
uses: actions/upload-release-asset@v1
186+
env:
187+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
188+
with:
189+
upload_url: ${{ steps.create_release.outputs.upload_url }}
190+
asset_path: ./aws-iot-device-sdk-embedded-C-${{ github.event.inputs.version_number }}.zip
191+
asset_name: aws-iot-device-sdk-embedded-C-${{ github.event.inputs.version_number }}.zip
192+
asset_content_type: application/zip

.github/workflows/upload-release.yml

Lines changed: 0 additions & 50 deletions
This file was deleted.

0 commit comments

Comments
 (0)