|
1 | | -name: Tag, Deploy Docs, and Create ZIP |
| 1 | +name: Release Automation |
2 | 2 |
|
3 | 3 | on: |
4 | 4 | workflow_dispatch: |
|
58 | 58 | env: |
59 | 59 | VERSION_NUMBER: ${{ github.event.inputs.version_number }} |
60 | 60 | 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*" |
62 | 62 | ls ./ |
63 | 63 | - name: Validate created ZIP |
64 | 64 | env: |
@@ -158,3 +158,35 @@ jobs: |
158 | 158 | exit 1 |
159 | 159 | fi |
160 | 160 | 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 |
0 commit comments