fix: type #2
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: Build Rust Project | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Set up Rust | |
uses: actions-rs/toolchain@v1 | |
with: | |
profile: minimal | |
toolchain: stable | |
- name: Check out code | |
uses: actions/checkout@v2 | |
- name: Build for Linux x86_64 | |
run: cargo build --release --target x86_64-unknown-linux-gnu | |
if: matrix.os == 'ubuntu-latest' | |
- name: Archive and SHA256sum for Linux x86_64 | |
run: | | |
mkdir artifacts | |
tar -czvf artifacts/rustycli_linux_x86_64.tar.gz target/x86_64-unknown-linux-gnu/release/rustycli | |
cd artifacts | |
sha256sum rustycli_linux_x86_64.tar.gz > rustycli_linux_x86_64.tar.gz.sha256 | |
if: matrix.os == 'ubuntu-latest' | |
- name: Build for Linux aarch64 | |
run: cargo build --release --target aarch64-unknown-linux-gnu | |
if: matrix.os == 'ubuntu-latest' | |
- name: Archive and SHA256sum for Linux aarch64 | |
run: | | |
tar -czvf artifacts/rustycli_linux_aarch64.tar.gz target/aarch64-unknown-linux-gnu/release/rustycli | |
cd artifacts | |
sha256sum rustycli_linux_aarch64.tar.gz > rustycli_linux_aarch64.tar.gz.sha256 | |
if: matrix.os == 'ubuntu-latest' | |
- name: Build for macOS | |
run: cargo build --release --target x86_64-apple-darwin | |
if: matrix.os == 'macos-latest' | |
- name: Archive and SHA256sum for macOS | |
run: | | |
tar -czvf artifacts/rustycli_macos.tar.gz target/x86_64-apple-darwin/release/rustycli | |
cd artifacts | |
sha256sum rustycli_macos.tar.gz > rustycli_macos.tar.gz.sha256 | |
ls -lah | |
if: matrix.os == 'macos-latest' | |
strategy: | |
matrix: | |
os: [ubuntu-latest, macos-latest] |