|
| 1 | +name: Github release for the repo |
| 2 | + |
| 3 | +permissions: |
| 4 | + contents: write |
| 5 | + |
| 6 | +on: |
| 7 | + push: |
| 8 | + tags: |
| 9 | + - '[0-9]+.[0-9]+.[0-9]+-beta' |
| 10 | + |
| 11 | +jobs: |
| 12 | + |
| 13 | + cargo_build: |
| 14 | + build: |
| 15 | + name: ${{ matrix.platform.os_name }} with rust ${{ matrix.toolchain }} |
| 16 | + runs-on: ${{ matrix.platform.os }} |
| 17 | + strategy: |
| 18 | + fail-fast: false |
| 19 | + matrix: |
| 20 | + platform: |
| 21 | + - os_name: Linux-aarch64 |
| 22 | + os: ubuntu-20.04 |
| 23 | + target: aarch64-unknown-linux-musl |
| 24 | + bin: figctl-linux-arm64 |
| 25 | + - os_name: Linux-x86_64 |
| 26 | + os: ubuntu-20.04 |
| 27 | + target: x86_64-unknown-linux-gnu |
| 28 | + bin: figctl-linux-amd64 |
| 29 | + - os_name: Windows-x86_64 |
| 30 | + os: windows-latest |
| 31 | + target: x86_64-pc-windows-msvc |
| 32 | + bin: figctl-amd64.exe |
| 33 | + - os_name: macOS-x86_64 |
| 34 | + os: macOS-latest |
| 35 | + target: x86_64-apple-darwin |
| 36 | + bin: figctl-darwin-amd64 |
| 37 | + - os_name: macOS-aarch64 |
| 38 | + os: macOS-latest |
| 39 | + target: aarch64-apple-darwin |
| 40 | + bin: figctl-darwin-arm64 |
| 41 | + toolchain: |
| 42 | + - stable |
| 43 | + steps: |
| 44 | + - uses: actions/checkout@v3 |
| 45 | + - name: Build binary |
| 46 | + uses: houseabsolute/actions-rust-cross@v0 |
| 47 | + with: |
| 48 | + command: "build" |
| 49 | + target: ${{ matrix.platform.target }} |
| 50 | + toolchain: ${{ matrix.toolchain }} |
| 51 | + args: "--locked --release" |
| 52 | + strip: true |
| 53 | + - name: Rename binary (linux and macos) |
| 54 | + run: mv target/${{ matrix.platform.target }}/release/figctl target/${{ matrix.platform.target }}/release/${{ matrix.platform.bin }} |
| 55 | + if: matrix.platform.os_name != 'Windows-x86_64' |
| 56 | + - name: Rename binary (windows) |
| 57 | + run: mv target/${{ matrix.platform.target }}/release/figctl.exe target/${{ matrix.platform.target }}/release/${{ matrix.platform.bin }} |
| 58 | + if: matrix.platform.os_name == 'Windows-x86_64' |
0 commit comments