Update Makefile #22
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: 'release 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.raw_{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 |