-
Notifications
You must be signed in to change notification settings - Fork 55
42 lines (34 loc) · 1.14 KB
/
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
name: Build and Release PlatformIO Project
on:
release:
types: [created]
jobs:
build:
runs-on: self-hosted
strategy:
matrix:
board: [esp32_s2, esp32_wroom, esp32_c3, esp32-s3-devkitm-1]
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
fetch-depth: 0 # Necessary to fetch all tags and history
- 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
# Upload assets to the newly created release
- name: Upload assets to Release
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: ${{ matrix.board }}.tar.gz
asset_name: ${{ matrix.board }}.tar.gz
tag: ${{ github.ref_name }} # Use the tag name of the created release
overwrite: true