v0.33 #14
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: | |
| release: | |
| types: [created] | |
| permissions: | |
| contents: write | |
| jobs: | |
| build: | |
| name: Build release binaries | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - name: Build all targets in devcontainer | |
| uses: devcontainers/ci@v0.3 | |
| with: | |
| push: never | |
| runCmd: | | |
| set -e | |
| # Install cross-compilation toolchain for linux-arm64 | |
| sudo apt-get update && sudo apt-get install -y gcc-aarch64-linux-gnu | |
| rustup target add aarch64-unknown-linux-gnu x86_64-unknown-linux-gnu | |
| # Build linux-x64 (native) | |
| cargo build --release --target x86_64-unknown-linux-gnu -p devcontainer-mcp | |
| # Build linux-arm64 (cross-compile with correct linker) | |
| CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER=aarch64-linux-gnu-gcc \ | |
| cargo build --release --target aarch64-unknown-linux-gnu -p devcontainer-mcp | |
| # Package as tarballs | |
| tar czf devcontainer-mcp-linux-x64.tar.gz -C target/x86_64-unknown-linux-gnu/release devcontainer-mcp | |
| tar czf devcontainer-mcp-linux-arm64.tar.gz -C target/aarch64-unknown-linux-gnu/release devcontainer-mcp | |
| - name: Upload linux-x64 | |
| uses: softprops/action-gh-release@v3 | |
| with: | |
| files: devcontainer-mcp-linux-x64.tar.gz | |
| - name: Upload linux-arm64 | |
| uses: softprops/action-gh-release@v3 | |
| with: | |
| files: devcontainer-mcp-linux-arm64.tar.gz | |
| build-macos: | |
| name: Build ${{ matrix.artifact }} | |
| runs-on: macos-latest | |
| strategy: | |
| matrix: | |
| include: | |
| - target: x86_64-apple-darwin | |
| artifact: devcontainer-mcp-darwin-x64 | |
| - target: aarch64-apple-darwin | |
| artifact: devcontainer-mcp-darwin-arm64 | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - uses: dtolnay/rust-toolchain@stable | |
| with: | |
| targets: ${{ matrix.target }} | |
| - uses: Swatinem/rust-cache@v2 | |
| with: | |
| key: ${{ matrix.target }} | |
| - name: Build | |
| run: cargo build --release --target ${{ matrix.target }} -p devcontainer-mcp | |
| - name: Package binary | |
| run: | | |
| tar czf ${{ matrix.artifact }}.tar.gz -C target/${{ matrix.target }}/release devcontainer-mcp | |
| - name: Upload release asset | |
| uses: softprops/action-gh-release@v3 | |
| with: | |
| files: ${{ matrix.artifact }}.tar.gz | |
| upload-install-script: | |
| name: Upload install scripts | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - name: Upload install.sh and install.ps1 | |
| uses: softprops/action-gh-release@v3 | |
| with: | |
| files: | | |
| install.sh | |
| install.ps1 |