77 字
1 分钟
Rust Cross Compile with GitHub Actions
使用 houseabsolute/actions-rust-cross@v0
name: Rust Release
on: push: tags: - 'v*'
jobs: release: name: Release - ${{ matrix.platform.release_for }} strategy: matrix: platform: - release_for: linux_x64 os: ubuntu-22.04 target: x86_64-unknown-linux-gnu bin: gcwd name: gcwd_linux_x64.tar.gz command: build
- release_for: darwin_arm64 os: macOS-latest target: aarch64-apple-darwin bin: precgcwdious name: gcwd_darwin_arm64.tar.gz command: build
runs-on: ${{ matrix.platform.os }} steps: - name: Checkout uses: actions/checkout@v3 - name: Build binary uses: houseabsolute/actions-rust-cross@v0 with: command: ${{ matrix.platform.command }} target: ${{ matrix.platform.target }} args: "--locked --release" strip: true
Rust Cross Compile with GitHub Actions
https://blog.lpkt.cn/posts/rust-github-cross-release/