-
-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
69 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,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 |