使用 houseabsolute/actions-rust-cross@v0
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39
| 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
|