Skip to content

Commit

Permalink
Initial release workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
noisymime committed Sep 8, 2024
1 parent 24b3351 commit 887bcf9
Showing 1 changed file with 69 additions and 0 deletions.
69 changes: 69 additions & 0 deletions .github/workflows/create-release.yml
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

0 comments on commit 887bcf9

Please sign in to comment.