fix(opi-coding-agent): resolve collapsible_match clippy lint in mcp_a… #6
Workflow file for this run
This file contains hidden or 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: Build Release Binaries | |
| on: | |
| push: | |
| tags: | |
| - "v*" | |
| workflow_dispatch: | |
| inputs: | |
| tag: | |
| description: "Tag to build (e.g., v0.2.0)" | |
| required: true | |
| type: string | |
| permissions: | |
| contents: write | |
| env: | |
| CARGO_TERM_COLOR: always | |
| RELEASE_TAG: ${{ github.event.inputs.tag || github.ref_name }} | |
| jobs: | |
| build: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - target: x86_64-unknown-linux-gnu | |
| os: ubuntu-latest | |
| artifact: opi-linux-x64 | |
| ext: tar.gz | |
| - target: aarch64-unknown-linux-gnu | |
| os: ubuntu-latest | |
| artifact: opi-linux-arm64 | |
| ext: tar.gz | |
| cross: true | |
| - target: x86_64-apple-darwin | |
| os: macos-latest | |
| artifact: opi-darwin-x64 | |
| ext: tar.gz | |
| - target: aarch64-apple-darwin | |
| os: macos-latest | |
| artifact: opi-darwin-arm64 | |
| ext: tar.gz | |
| - target: x86_64-pc-windows-msvc | |
| os: windows-latest | |
| artifact: opi-windows-x64 | |
| ext: zip | |
| - target: aarch64-pc-windows-msvc | |
| os: windows-latest | |
| artifact: opi-windows-arm64 | |
| ext: zip | |
| tier2: true | |
| runs-on: ${{ matrix.os }} | |
| continue-on-error: ${{ matrix.tier2 == true }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| ref: ${{ env.RELEASE_TAG }} | |
| - uses: dtolnay/rust-toolchain@stable | |
| with: | |
| targets: ${{ matrix.target }} | |
| - uses: Swatinem/rust-cache@v2 | |
| with: | |
| key: ${{ matrix.target }} | |
| - name: Install cross | |
| if: matrix.cross | |
| run: cargo install cross --git https://github.com/cross-rs/cross | |
| - name: Build (cross) | |
| if: matrix.cross | |
| run: cross build --release --target ${{ matrix.target }} -p opi-coding-agent | |
| - name: Build (native) | |
| if: "!matrix.cross" | |
| run: cargo build --release --target ${{ matrix.target }} -p opi-coding-agent | |
| - name: Package (unix) | |
| if: matrix.ext == 'tar.gz' | |
| run: | | |
| cd target/${{ matrix.target }}/release | |
| tar czf ../../../${{ matrix.artifact }}.tar.gz opi | |
| shell: bash | |
| - name: Package (windows) | |
| if: matrix.ext == 'zip' | |
| run: | | |
| cd target/${{ matrix.target }}/release | |
| 7z a ../../../${{ matrix.artifact }}.zip opi.exe | |
| shell: bash | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: ${{ matrix.artifact }} | |
| path: ${{ matrix.artifact }}.${{ matrix.ext }} | |
| release: | |
| needs: build | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/download-artifact@v4 | |
| with: | |
| path: artifacts | |
| merge-multiple: true | |
| - name: Generate SHA256SUMS | |
| run: | | |
| cd artifacts | |
| sha256sum opi-* > SHA256SUMS.txt | |
| cat SHA256SUMS.txt | |
| - name: Upload to GitHub Release | |
| env: | |
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| run: | | |
| cd artifacts | |
| gh release upload "${RELEASE_TAG}" \ | |
| opi-* \ | |
| SHA256SUMS.txt \ | |
| --clobber |