forked from FreeRTOS/FreeRTOS
-
Notifications
You must be signed in to change notification settings - Fork 1
62 lines (55 loc) · 2.07 KB
/
release-packager.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
51
52
53
54
55
56
57
58
59
60
61
name: FreeRTOS-Release-Packager
on:
workflow_dispatch:
inputs:
commit_id:
description: 'Commit ID'
required: true
version_number:
description: 'Version Number (Ex. 10.4.1)'
required: true
default: '10.4.1'
jobs:
release-packager:
name: Release Packager
runs-on: ubuntu-latest
steps:
# Need a separate copy to fetch packing tools, as source FreeRTOS dir will be pruned and operated on
- name: Checkout FreeRTOS Tools
uses: actions/checkout@v2
with:
ref: master
path: tools
# Setup packing tools
- name: Tool Setup
uses: actions/setup-python@v2
with:
python-version: 3.8.5
architecture: x64
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# Packaging
- name: Packaging
run: python tools/.github/scripts/freertos_zipper.py --freertos-commit ${{ github.event.inputs.commit_id }} --zip-version ${{ github.event.inputs.version_number }}
# Create release endpoint
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: V${{ github.event.inputs.version_number }}
release_name: FreeRTOS Release V${{ github.event.inputs.version_number }}
draft: false
prerelease: false
commitish: ${{ github.event.inputs.commit_id }}
# Upload release assets the recently created endpoint
- name: Upload Release
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./FreeRTOSv${{ github.event.inputs.version_number }}.zip
asset_name: FreeRTOSv${{ github.event.inputs.version_number }}.zip
asset_content_type: application/zip