ci: fix release artifact naming conflicts across platforms #2
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: Release | |
| on: | |
| push: | |
| tags: ['v*'] | |
| jobs: | |
| build: | |
| strategy: | |
| matrix: | |
| include: | |
| - target: x86_64-unknown-linux-gnu | |
| artifact_name: async-bash-mcp-linux-x86_64 | |
| - target: aarch64-unknown-linux-gnu | |
| artifact_name: async-bash-mcp-linux-arm64 | |
| - target: x86_64-apple-darwin | |
| artifact_name: async-bash-mcp-macos-x86_64 | |
| - target: aarch64-apple-darwin | |
| artifact_name: async-bash-mcp-macos-arm64 | |
| runs-on: ${{ contains(matrix.target, 'apple') && 'macos-latest' || 'ubuntu-latest' }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: dtolnay/rust-toolchain@stable | |
| with: | |
| targets: ${{ matrix.target }} | |
| - name: Install cross (Linux ARM64 only) | |
| if: matrix.target == 'aarch64-unknown-linux-gnu' | |
| run: cargo install cross | |
| - name: Build | |
| run: | | |
| if [ "${{ matrix.target }}" = "aarch64-unknown-linux-gnu" ]; then | |
| cross build --release --target ${{ matrix.target }} | |
| else | |
| cargo build --release --target ${{ matrix.target }} | |
| fi | |
| - name: Rename binary | |
| run: cp target/${{ matrix.target }}/release/async-bash-mcp ${{ matrix.artifact_name }} | |
| - name: Upload binary | |
| uses: softprops/action-gh-release@v1 | |
| with: | |
| files: ${{ matrix.artifact_name }} |