Skip to content

Update release.yml

Update release.yml #15

Workflow file for this run

name: Build and Release
on:
push:
tags:
- "v*" # Trigger on tags starting with 'v' (e.g., v1.0.0)
jobs:
build_bluepill:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Set up Rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
- name: Add rust target
working-directory: ./doggie_bluepill
run: rustup target add thumbv7m-none-eabi
- name: Build doggie bluepill
working-directory: ./doggie_bluepill
run: cargo build --release --all
- name: Upload binaries
uses: actions/upload-artifact@v4
with:
name: doggie-bluepill-binaries
path: |
./doggie_bluepill/target/thumbv7m-none-eabi/release/doggie_bluepill_usb_mcp
./doggie_bluepill/target/thumbv7m-none-eabi/release/doggie_bluepill_uart_mcp
./doggie_bluepill/target/thumbv7m-none-eabi/release/doggie_bluepill_uart_int
build_pico:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Set up Rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
- name: Add rust target
working-directory: ./doggie_pico
run: rustup target add thumbv6m-none-eabi
- name: Install elf2uf2-rs
working-directory: ./doggie_pico
run: sudo apt update && sudo apt install libudev-dev && cargo install elf2uf2-rs
- name: Build doggie_pico
working-directory: ./doggie_pico
run: cargo build --release --all
- name: Convert to uf2
working-directory: ./doggie_pico/target/thumbv6m-none-eabi/release/
run: elf2uf2-rs doggie_pico_usb_mcp doggie_pico_usb_mcp.uf2 && elf2uf2-rs doggie_pico_uart_mcp doggie_pico_uart_mcp.uf2
- name: Upload binaries
uses: actions/upload-artifact@v4
with:
name: doggie-pico-binaries
path: |
./doggie_pico/target/thumbv6m-none-eabi/release/doggie_pico_uart_mcp
./doggie_pico/target/thumbv6m-none-eabi/release/doggie_pico_uart_mcp.uf2
./doggie_pico/target/thumbv6m-none-eabi/release/doggie_pico_usb_mcp
./doggie_pico/target/thumbv6m-none-eabi/release/doggie_pico_usb_mcp.uf2
build_esp32:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Set up Rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
- name: Set up toolchain
run: cargo install ldproxy && cargo install espup && espup install
- name: Build doggie_esp32
working-directory: ./doggie_esp32
run: . $HOME/export-esp.sh && DEFMT_LOG=off cargo build --release
- name: Upload binaries
uses: actions/upload-artifact@v4
with:
name: doggie-esp32-binaries
path: |
./doggie_esp32/target/xtensa-esp32-none-elf/release/doggie_esp32
release:
runs-on: ubuntu-latest
needs:
- build_bluepill
- build_pico
- build_esp32
steps:
- name: Download build artifacts
uses: actions/download-artifact@v4
with:
pattern: doggie-*
merge-multiple: true
- name: Create GitHub Release
uses: ncipollo/release-action@v1
with:
artifacts: doggie_bluepill_usb_mcp, doggie_bluepill_uart_mcp, doggie_bluepill_uart_int, doggie_pico_uart_mcp, doggie_pico_uart_mcp.uf2, doggie_pico_usb_mcp, doggie_pico_usb_mcp.uf2, doggie_esp32
token: ${{ secrets.GITHUB_TOKEN }}
tag: ${{ github.ref_name }}
name: "Doggie Release ${{ github.ref_name }}"
body: |
This release contains the binaries for:
- Doggie Bluepill
- Doggie Pico
- Doggie ESP32
For more information about building and flashing, check `README.md`