forked from pdrbsts/uv-k5-firmware-custom
-
Notifications
You must be signed in to change notification settings - Fork 0
68 lines (55 loc) · 1.93 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" ]
release:
types:
- published
# - draft
# - prerelease
# - created
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: arm-none-eabi-gcc
uses: carlosperate/arm-none-eabi-gcc-action@v1
with:
# release: 'latest'
release: '11.3.Rel1'
# release: '11.2-2022.02'
- 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 +'%A %d.%m.%Y %H:%M - %Z')" #>> $GITHUB_OUTPUT
# run: echo "::set-output name=date::$(date +'%Y-%m-%d')"
run: echo "date=$(date +'%A %d.%m.%Y %H:%M - %Z')" >> $GITHUB_OUTPUT
- name: 'Add unpacked FW to release'
uses: svenstaro/upload-release-action@v2
with:
file: firmware.bin
asset_name: ${{ format('firmware_raw_0.{0}.bin', github.run_number) }}
tag: ${{ format('release-{0}', github.run_number) }}
release_name: ${{ format('Build 0.{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_0.{0}.bin', github.run_number) }}
tag: ${{ format('release-{0}', github.run_number) }}
release_name: ${{ format('Build 0.{0}, {1}', github.run_number, steps.date.outputs.date) }}