v0.1.5-3 #15
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: 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 -y cargo-espflash | |
- name: Enable caching | |
uses: Swatinem/rust-cache@v2 | |
- name: Build binary | |
run: cargo espflash save-image --release --chip esp32s3 esparrier.bin | |
- name: Build M5AtomS3 Lite binary (with `smartled` feature enabled at PIN 35) | |
run: cargo espflash save-image --release --chip esp32s3 --features smartled esparrier-m5atoms3-lite.bin | |
- name: Build XIAO-ESP32S3 binary (with `led` feature enabled at PIN 21) | |
run: cargo espflash save-image --release --chip esp32s3 --features led esparrier-xiao-esp32s3.bin | |
- name: Build archive | |
shell: bash | |
run: | | |
package_name="esparrier" | |
dirname="$package_name-${{ env.VERSION }}" | |
mkdir -p "$dirname" | |
mv "esparrier.bin" "$dirname" | |
mv "esparrier-m5atoms3-lite.bin" "$dirname" | |
mv "esparrier-xiao-esp32s3.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 }} |