-
Notifications
You must be signed in to change notification settings - Fork 31
57 lines (48 loc) · 1.38 KB
/
build_and_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
51
52
53
54
55
56
57
name: Build and Release
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
build:
runs-on: ubuntu-22.04
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
submodules: 'true'
- name: Install ARM GCC Toolchain
run: |
sudo apt-get update
sudo apt-get install -y gcc-arm-none-eabi
- name: Build with Make
run: make -j4
- name: Upload artifacts
uses: actions/upload-artifact@v3
with:
name: build-artifacts
path: |
./src/bootloader/usbdfu.elf
./src/bootloader/usbdfu.hex
./src/i2c-stm32f1-usb/i2c-stm32f1-usb.elf
./src/i2c-stm32f4-usb/i2c-stm32f4-usb.elf
release:
needs: build
runs-on: ubuntu-22.04
steps:
- name: Download artifacts
uses: actions/download-artifact@v3
with:
name: build-artifacts
- name: Release
uses: softprops/action-gh-release@d4e8205d7e959a9107da6396278b2f1f07af0f9b
if: startsWith(github.ref, 'refs/tags/')
with:
files: |
./build-artifacts/src/bootloader/usbdfu.elf
./build-artifacts/src/bootloader/usbdfu.hex
./build-artifacts/src/i2c-stm32f1-usb/i2c-stm32f1-usb.elf
./build-artifacts/src/i2c-stm32f4-usb/i2c-stm32f4-usb.elf