-
Notifications
You must be signed in to change notification settings - Fork 0
54 lines (51 loc) · 1.44 KB
/
pio_deploy.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
44
45
46
47
48
49
50
51
52
53
54
name: Release Build
on:
push:
tags:
- firmware-*
jobs:
build:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./code
steps:
- uses: actions/checkout@v2
- name: Get tags
run: git fetch --force --tags
- name: Cache pip
uses: actions/cache@v2
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Cache PlatformIO
uses: actions/cache@v2
with:
path: ~/.platformio
key: ${{ runner.os }}-${{ hashFiles('**/lockfiles') }}
- name: Set up Python
uses: actions/setup-python@v2
- name: Install PlatformIO
run: |
python -m pip install --upgrade pip
pip install --upgrade platformio
- name: Build firmware EN
run: |
COMPILE_LANG=en pio run -e esp32dev
tree -L 4 -a
cp ./.pio/build/esp32dev/firmware.bin ./firmware_en.bin
cp ./.pio/build/esp32dev/firmware.bin ./firmware.bin
- name: Build firmware DE
run: |
COMPILE_LANG=de pio run -e esp32dev
cp ./.pio/build/esp32dev/firmware.bin ./firmware_de.bin
- name: Upload image to release
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file_glob: true
overwrite: true
file: ./code/firmware*.bin
tag: ${{ github.ref }}