codemonument_bx 0.3.5

[DEPRECATED: Use `bx-cli` instead] Simple, cross-platform, and fast command aliases with superpowers.
Documentation
name: Build and Release

on:
    push:
        tags:
            - "v*"
    # allow manually triggering the jobs (needed to populate forked releases)
    workflow_dispatch:

jobs:
    # This builds and releases for Windows, MacOS, and Linux
    usu-build-release:
        runs-on: ${{ matrix.os }}
        strategy:
            matrix:
                include:
                    - os: ubuntu-latest
                      target_dir: release
                      artifact_name: bx
                      asset_name: bx-linux-amd64
                    - os: macos-14
                      target: x86_64-apple-darwin
                      target_dir: x86_64-apple-darwin/release
                      artifact_name: bx
                      asset_name: bx-macos-amd64
                    - os: macos-14
                      target: aarch64-apple-darwin
                      target_dir: aarch64-apple-darwin/release
                      artifact_name: bx
                      asset_name: bx-macos-arm64
                    - os: windows-latest
                      target_dir: release
                      artifact_name: bx.exe
                      asset_name: bx-windows-amd64
        steps:
            - uses: actions/checkout@v4
            - name: Install Rust target (macOS cross-compile)
              if: matrix.target != ''
              run: rustup target add ${{ matrix.target }}
            - name: Build (with target)
              if: matrix.target != ''
              run: cargo build --release --locked --target ${{ matrix.target }}
            - name: Build (native)
              if: matrix.target == ''
              run: cargo build --release --locked

            - name: Release binary "bx"
              uses: svenstaro/upload-release-action@v2
              with:
                  repo_token: ${{ secrets.GITHUB_TOKEN }}
                  file: target/${{ matrix.target_dir }}/${{ matrix.artifact_name }}
                  asset_name: ${{ matrix.asset_name }}
                  tag: ${{ github.ref }}
                  body: "See [CHANGELOG.md](./CHANGELOG.md) for details."

    # This builds and releases for musl
    musl-build-release:
        runs-on: ubuntu-latest # We cross-compile from Ubuntu
        steps:
            - uses: actions/checkout@v4
            - name: Install musl toolchain
              run: rustup target add x86_64-unknown-linux-musl
            - name: Build
              run: cargo build --release --target x86_64-unknown-linux-musl --locked
            - name: Release binary bx
              uses: svenstaro/upload-release-action@v2
              with:
                  repo_token: ${{ secrets.GITHUB_TOKEN }}
                  file: target/x86_64-unknown-linux-musl/release/bx
                  asset_name: bx-musl-amd64
                  tag: ${{ github.ref }}
                  body: "See [CHANGELOG.md](./CHANGELOG.md) for details."