brandon 0.1.0

Standalone Rust toolkit for Ethereum ERA/ERA1 files — read, write, verify, convert
Documentation
name: Release

on:
  push:
    tags:
      - "v*"

permissions:
  contents: write

env:
  CARGO_TERM_COLOR: always

jobs:
  build:
    strategy:
      fail-fast: false
      matrix:
        include:
          - os: ubuntu-latest
            artifact: brandon-linux-x86_64
          - os: macos-latest
            artifact: brandon-macos
          - os: windows-latest
            artifact: brandon-windows.exe

    runs-on: ${{ matrix.os }}

    steps:
      - uses: actions/checkout@v5

      - uses: dtolnay/rust-toolchain@stable

      - uses: Swatinem/rust-cache@v2

      - name: Build
        run: cargo build --release

      - name: Package (Unix)
        if: runner.os != 'Windows'
        run: |
          mkdir dist
          cp target/release/brandon dist/${{ matrix.artifact }}
          tar -czf ${{ matrix.artifact }}.tar.gz -C dist .

      - name: Package (Windows)
        if: runner.os == 'Windows'
        shell: pwsh
        run: |
          mkdir dist
          Copy-Item target/release/brandon.exe dist/${{ matrix.artifact }}
          Compress-Archive dist/* ${{ matrix.artifact }}.zip

      - name: Upload artifact (Unix)
        if: runner.os != 'Windows'
        uses: softprops/action-gh-release@v2
        with:
          files: "*.tar.gz"

      - name: Upload artifact (Windows)
        if: runner.os == 'Windows'
        uses: softprops/action-gh-release@v2
        with:
          files: "*.zip"