-
-
Notifications
You must be signed in to change notification settings - Fork 7
69 lines (56 loc) · 2.2 KB
/
create-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
58
59
60
61
62
63
64
65
66
67
68
69
name: Create release
on:
push:
tags:
- "*.*.*"
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Cache pip
uses: actions/cache@v4
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Cache PlatformIO
uses: actions/cache@v4
with:
path: ~/.platformio
key: ${{ runner.os }}-${{ hashFiles('**/lockfiles') }}
- name: Set up Python
uses: actions/setup-python@v5
- name: Install PlatformIO
run: |
python -m pip install --upgrade pip
pip install --upgrade platformio
- name: Build Firmware
run: platformio run -e esp32-c3-supermini
- name: Build Filesystem
run: platformio run --target buildfs --environment esp32-c3-supermini
- name: Upload to Speeduino server
if: startsWith(github.ref, 'refs/tags/')
env:
WEB_PWD: ${{ secrets.WEB_PWD }}
TAG_NAME: ${{ github.ref_name }}
run: |
curl -v https://speeduino.com:2078 || true
curl -v --tlsv1.2 --ipv4 --user "[email protected]:$WEB_PWD" --basic -X MKCOL "https://speeduino.com:2078/AirBear/$TAG_NAME"
curl -v --tlsv1.2 --ipv4 --user "[email protected]:$WEB_PWD" --basic -T "./.pio/build/esp32-c3-supermini/firmware.bin" "https://speeduino.com:2078/AirBear/$TAG_NAME/AirBear-esp32-c3.bin"
curl -v --tlsv1.2 --ipv4 --user "[email protected]:$WEB_PWD" --basic -T "./.pio/build/esp32-c3-supermini/littlefs.bin" "https://speeduino.com:2078/AirBear/$TAG_NAME/AirBear-Dash-Data-littlefs.bin"
- name: Build Changelog
uses: mikepenz/release-changelog-builder-action@v5
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
mode: "COMMIT"
- name: Create Release
uses: softprops/action-gh-release@v2
if: startsWith(github.ref, 'refs/tags/')
with:
body: ${{steps.github_release.outputs.changelog}}
files: |
./.pio/build/esp32-c3-supermini/firmware.bin
./.pio/build/esp32-c3-supermini/littlefs.bin