-
-
Notifications
You must be signed in to change notification settings - Fork 0
41 lines (36 loc) · 1.11 KB
/
ota-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
name: OTA Release
on:
release:
types: [published]
jobs:
generate:
name: Create release-artifacts
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected]
- uses: actions/[email protected]
with:
path: |
~/.cache/pip
~/.platformio/.cache
key: ${{ runner.os }}-pio
- uses: actions/[email protected]
with:
python-version: '3.9'
- name: Install Python packages
run: |
pip install --upgrade platformio
pip install --upgrade cryptography
- name: Create files
env:
OTA_KEY: ${{ secrets.OTA_SIGNING_KEY }}
run: |
echo "$OTA_KEY" > "${GITHUB_WORKSPACE}/priv_key.pem"
python "${GITHUB_WORKSPACE}/noisemeter-device/certs.py" -s api.tracket.info > "${GITHUB_WORKSPACE}/noisemeter-device/certs.h"
- name: Build signed firmware
run: pio run -t ota -e esp32-pcb
- name: Upload signed firmware
uses: djn24/add-asset-to-release@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
path: 'firmware_signed.bin'