# Generated with Claude Sonnet 4.6 # by Joao Eduardo Luis on Mar 31 2026 # name: Release cbsd-rs on: push: tags: - "v*" workflow_dispatch: inputs: tag_name: description: "Tag to build (e.g., v1.0.0)" required: true type: string jobs: build-cbc: strategy: matrix: include: - os: ubuntu-latest target: x86_64-unknown-linux-musl target_name: linux-amd64 - os: ubuntu-22.04-arm target: aarch64-unknown-linux-musl target_name: linux-aarch64 - os: macos-14 target: aarch64-apple-darwin target_name: macos-arm64 runs-on: ${{ matrix.os }} permissions: contents: write steps: - name: Checkout Code uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 with: ref: ${{ inputs.tag_name }} - name: Install Rust Toolchain uses: dtolnay/rust-toolchain@aad518f59d88bae90133242f9ddac7f8bbc5dddf # v1.94.1 with: targets: ${{ matrix.target }} - name: Install musl Tools if: runner.os == 'Linux' run: sudo apt-get install -y musl-tools - name: Build cbc working-directory: cbsd-rs run: cargo build --release --package cbc --target ${{ matrix.target }} - name: Prepare Artifacts shell: bash run: | TAG_NAME="${{ inputs.tag_name }}" if [ -z "$TAG_NAME" ]; then TAG_NAME=${GITHUB_REF#refs/tags/} fi echo "Preparing artifacts for tag: $TAG_NAME" BINARY="cbsd-rs/target/${{ matrix.target }}/release/cbc" cp "${BINARY}" "cbc-${{ matrix.target_name }}" - name: Create Release uses: softprops/action-gh-release@a06a81a03ee405af7f2048a818ed3f03bbf83c7b # v2.5.0 with: tag_name: ${{ inputs.tag_name }} files: | cbc-${{ inputs.tag_name || github.ref_name }}-${{ matrix.target_name }} cbc-${{ matrix.target_name }} generate_release_notes: true build-release-bundle: runs-on: ubuntu-latest permissions: contents: write steps: - name: Checkout Code uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 with: ref: ${{ inputs.tag_name }} - name: Build Config Tarball run: | ./cbsd-rs/systemd/gen-config-archive.sh - name: Create Release uses: softprops/action-gh-release@a06a81a03ee405af7f2048a818ed3f03bbf83c7b # v2.5.0 with: tag_name: ${{ inputs.tag_name }} files: | cbsd-rs-config.tar cbsd-rs/systemd/install.sh generate_release_notes: true