Skip to content

v6.2.1

v6.2.1 #8

name: Build binaries
on:
release:
types: [published]
jobs:
release:
permissions:
contents: write
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
toolchain: 1.80.0
override: true
- uses: actions/cache@v2
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo-${{ hashFiles('Cargo.lock') }}
- name: Run tests
run: cargo test
- name: Build release
run: cargo build --release
- name: Archive as .tar.gz (Linux)
if: matrix.os == 'ubuntu-latest'
run: tar cfz rt-x86_64-linux.tar.gz -C target/release rt
- name: Archive as .tar.gz (macOS)
if: matrix.os == 'macos-latest'
run: tar cfz rt-aarch64-darwin.tar.gz -C target/release rt
- name: Archive as .zip (Windows)
if: matrix.os == 'windows-latest'
shell: bash
run: 7z a -tzip -mm=Deflate rt-x86_64-windows.zip ./target/release/rt.exe
- name: Publish
uses: softprops/action-gh-release@v1
with:
files: |
rt*.tar.gz
rt*.zip