-
Notifications
You must be signed in to change notification settings - Fork 55
43 lines (35 loc) · 994 Bytes
/
Publish.yaml
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
name: Build and Release PlatformIO Project
on:
push:
branches:
- main
jobs:
build:
runs-on: self-hosted
strategy:
matrix:
board: [esp32_s2, esp32_wroom, esp32_c3]
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.x'
- name: Install PlatformIO
run: pip install platformio
- name: Build with PlatformIO
run: platformio run --environment ${{ matrix.board }}
- name: Tar artifacts
run: tar -czvf ${{ matrix.board }}.tar.gz -C .pio/build/${{ matrix.board }} firmware.bin partitions.bin bootloader.bin
- name: Create Release
id: create_release
uses: softprops/action-gh-release@v1
with:
files: |
./${{ matrix.board }}.zip
tag_name: ${{ github.ref }}
draft: false
prerelease: false
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}