Skip to content

v0.4.2

v0.4.2 #26

Workflow file for this run

name: Release
on:
push:
tags:
- "v[0-9]+.[0-9]+.[0-9]+"
- "v[0-9]+.[0-9]+.[0-9]+-[a-zA-Z0-9]+"
workflow_dispatch:
env:
CARGO_TERM_COLOR: always
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
jobs:
rust-checks:
name: Rust Build
permissions:
contents: write
runs-on: ubuntu-latest
strategy:
fail-fast: false
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Get the release version from the tag
shell: bash
run: echo "VERSION=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV
- name: Setup Rust
uses: esp-rs/xtensa-toolchain@v1.5
with:
default: true
buildtargets: esp32
ldproxy: false
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get -y install libudev-dev libusb-dev
- name: Install espflash
run: cargo install cargo-espflash
- name: Enable caching
uses: Swatinem/rust-cache@v2
- name: Build binary
run: cargo espflash save-image --merge --flash-size 1mb --release --chip esp32s3 --partition-table partitions_single_app.csv esparrier.bin
- name: Build M5AtomS3 Lite binary (with `m5atoms3-lite` features enabled)
run: cargo espflash save-image --merge --flash-size 1mb --release --chip esp32s3 --features m5atoms3-lite --partition-table partitions_single_app.csv esparrier-m5atoms3-lite.bin
- name: Build M5AtomS3 binary (with `m5atoms3` feature enabled)
run: cargo espflash save-image --merge --flash-size 1mb --release --chip esp32s3 --features m5atoms3 --partition-table partitions_single_app.csv esparrier-m5atoms3.bin
- name: Build XIAO-ESP32S3 binary (with `led` feature enabled)
run: cargo espflash save-image --merge --flash-size 1mb --release --chip esp32s3 --features xiao-esp32s3 esparrier-xiao-esp32s3.bin
- name: Build ESP32-S3-DevKitC-1 v1.0 binary (with `smartled` feature enabled)
run: SMART_LED_PIN=48 cargo espflash save-image --merge --flash-size 1mb --release --chip esp32s3 --features smartled esparrier-esp32s3-devkitc-1-v1_0.bin
- name: Build ESP32-S3-DevKitC-1 v1.1 binary (with `smartled` feature enabled)
run: SMART_LED_PIN=38 cargo espflash save-image --merge --flash-size 1mb --release --chip esp32s3 --features smartled esparrier-esp32s3-devkitc-1-v1_1.bin
- name: Build archive
shell: bash
run: |
package_name="esparrier"
dirname="$package_name-${{ env.VERSION }}"
mkdir -p "$dirname"
cp "zero.bin" "$dirname"
mv "esparrier.bin" "$dirname"
mv "esparrier-m5atoms3-lite.bin" "$dirname"
mv "esparrier-m5atoms3.bin" "$dirname"
mv "esparrier-xiao-esp32s3.bin" "$dirname"
mv "esparrier-esp32s3-devkitc-1-v1_0.bin" "$dirname"
mv "esparrier-esp32s3-devkitc-1-v1_1.bin" "$dirname"
tar -czf "$dirname.tar.gz" "$dirname"
echo "ASSET=$dirname.tar.gz" >> $GITHUB_ENV
- name: Release
uses: softprops/action-gh-release@v1
with:
files: |
${{ env.ASSET }}