Change features #3
Workflow file for this run
This file contains 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 Test | |
on: | |
push: | |
jobs: | |
release: | |
name: ${{ matrix.target }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- os: ubuntu-20.04 | |
target: x86_64-unknown-linux-musl | |
- os: ubuntu-20.04 | |
target: arm-unknown-linux-musleabihf | |
- os: ubuntu-20.04 | |
target: armv7-unknown-linux-musleabihf | |
- os: ubuntu-20.04 | |
target: aarch64-unknown-linux-musl | |
- os: macos-11 | |
target: x86_64-apple-darwin | |
- os: macos-11 | |
target: aarch64-apple-darwin | |
- os: windows-latest | |
target: x86_64-pc-windows-msvc | |
- os: windows-latest | |
target: aarch64-pc-windows-msvc | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Set artifact name | |
shell: bash | |
run: | | |
version="$(git describe --tags --match='v*.*.*' --always)" | |
name="mailbox-$version-${{ matrix.target }}" | |
echo "ARTIFACT_NAME=$name" >> $GITHUB_ENV | |
echo "version: $version" | |
echo "artifact: $name" | |
- name: Install Rust | |
uses: dtolnay/rust-toolchain@stable | |
with: | |
target: ${{ matrix.target }} | |
- name: Install cross | |
if: matrix.os == 'ubuntu-20.04' | |
uses: taiki-e/install-action@cross | |
- name: Build binary [Cross] | |
if: matrix.os == 'ubuntu-20.04' | |
run: cross build --release --locked --target ${{ matrix.target }} --color=always --verbose | |
- name: Build binary [Cargo] | |
if: matrix.os != 'ubuntu-20.04' | |
run: cargo build --release --locked --target ${{ matrix.target }} --color=always --verbose | |
- name: Package [*nix] | |
if: runner.os != 'Windows' | |
run: > | |
tar -cv | |
LICENSE README.md | |
cli/man/ | |
-C cli/contrib/ completions/ -C ../../ | |
-C target/${{ matrix.target }}/release/ mailbox mailbox-server | |
| gzip --best > '${{ env.ARTIFACT_NAME }}.tar.gz' | |
- name: Package [Windows] | |
if: runner.os == 'Windows' | |
run: > | |
7z a ${{ env.ARTIFACT_NAME }}.zip | |
LICENSE README.md | |
./cli/man/ | |
./cli/contrib/completions/ | |
./target/${{ matrix.target }}/release/mailbox.exe | |
./target/${{ matrix.target }}/release/mailbox-server.exe | |
- name: Setup tmate session | |
if: ${{ failure() }} | |
uses: mxschmitt/action-tmate@v3 |