forked from aws/aws-iot-device-sdk-embedded-C
-
Notifications
You must be signed in to change notification settings - Fork 0
50 lines (48 loc) · 1.88 KB
/
upload-release.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
name: Create Release for Existing Tag
on:
workflow_dispatch:
inputs:
workflow_name:
description: 'Name of workflow (file name) to obtain ZIP from'
default: tag-and-zip
required: false
workflow_id:
description: 'Workflow Run ID to obtain ZIP from'
required: true
version_number:
description: 'Tag Version Number (Eg, 202012.00) to release'
required: true
jobs:
create-release:
name: Create Release and Upload Release Asset
runs-on: ubuntu-latest
steps:
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.event.inputs.version_number }}
release_name: ${{ github.event.inputs.version_number }}
body: Release version ${{ github.event.inputs.version_number }} of the AWS IoT Device SDK for Embedded C.
draft: false
prerelease: false
- name: Download ZIP artifact
uses: dawidd6/action-download-artifact@v2
with:
github_token: ${{secrets.GITHUB_TOKEN}}
# Required, workflow file name or ID
workflow: ${{ github.event.inputs.workflow_name }}.yml
run_id: ${{ github.event.inputs.run_id }}
name: aws-iot-device-sdk-embedded-C-${{ github.event.inputs.version_number }}.zip
- name: Upload Release Asset
id: upload-release-asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./aws-iot-device-sdk-embedded-C-${{ github.event.inputs.version_number }}.zip
asset_name: aws-iot-device-sdk-embedded-C-${{ github.event.inputs.version_number }}.zip
asset_content_type: application/zip