forked from pdrbsts/uv-k5-firmware-custom
-
Notifications
You must be signed in to change notification settings - Fork 0
68 lines (54 loc) · 1.77 KB
/
main.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
62
63
64
65
66
67
68
name: 'main'
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
# tags:
# - "v[0-9]+.[0-9]+.[0-9]+"
release:
types:
- published
# - draft
# - prerelease
# - created
jobs:
build:
runs-on: ubuntu-22.04
steps:
- name: arm-none-eabi-gcc
uses: carlosperate/arm-none-eabi-gcc-action@v1
with:
release: '10.3-2021.10'
- name: Install Python dependencies
run: python3 -m pip install --upgrade pip crcmod
- name: Checkout
uses: actions/checkout@v3
# with:
# fetch-depth: 0
- name: Submodules
run: git submodule update --init --recursive --depth 1
- name: Make
run: make
- name: size
run: arm-none-eabi-size firmware
- name: rename
run: mv firmware.packed.bin firmware_packed${{ github.event.release.tag_name }}.bin
- name: Get the date
id: date
run: echo "::set-output name=date::$(date +'%Y-%m-%d')"
- name: 'Add unpacked FW to release'
uses: svenstaro/upload-release-action@v2
with:
file: firmware.bin
asset_name: ${{ format('firmware.unpacked_{0}.bin', github.run_number) }}
tag: ${{ format('release-{0}', github.run_number) }}
release_name: ${{ format('Release {0}, {1}', github.run_number, steps.date.outputs.date) }}
- name: 'Add packed FW to release'
uses: svenstaro/upload-release-action@v2
with:
file: firmware_packed${{ github.event.release.tag_name }}.bin
asset_name: ${{ format('firmware_packed_v{0}.bin', github.run_number) }}
tag: ${{ format('release-{0}', github.run_number) }}
release_name: ${{ format('Release {0}, {1}', github.run_number, steps.date.outputs.date) }}
#created_at