Fix littlefs upload from remote #6
Workflow file for this run
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
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/firmware.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/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 |