Update rust.yml #14
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
on: [push] | |
env: | |
MANDY_ENV: "production" | |
name: Mandy Release CI | |
jobs: | |
test-matrix: | |
strategy: | |
matrix: | |
os: [ubuntu-latest, windows-latest, macos-latest, macos-13] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: stable | |
- name: "Build Mandy." | |
uses: actions-rs/cargo@v1 | |
with: | |
command: build | |
args: --release | |
- name: "Rename binary for Windows." | |
if: runner.os == 'Windows' | |
shell: bash | |
run: | | |
mv target/release/mandy.exe ./mandy-windows-v.0.1.0.exe | |
ls | |
- name: "Rename binary for Mac OS (ARM64)." | |
if: runner.os == 'Macos' && runner.arch != 'x64' | |
run: | | |
mv target/release/mandy ./mandy-macos-aarch64-v.0.1.0 | |
ls | |
- name: "Rename binary for Mac OS (X64)." | |
if: runner.os == 'Macos' && runner.arch == 'x64' | |
run: | | |
mv target/release/mandy ./mandy-macos-x64-v.0.1.0 | |
ls | |
- name: "Rename binary for Linux." | |
if: runner.os == 'Linux' | |
run: | | |
mv target/release/mandy ./mandy-linux-v.0.1.0 | |
ls | |
- name: "Upload binary as an artifact (Windows)." | |
if: runner.os == 'Windows' | |
uses: actions/upload-artifact@v4 | |
with: | |
name: Mandy Binary for Windows | |
path: mandy-windows-v.0.1.0.exe | |
- name: "Upload binary as an artifact (Macos ARM64)." | |
if: runner.os == 'Macos' && runner.arch != 'X64' | |
uses: actions/upload-artifact@v4 | |
with: | |
name: mandy-macos-aarch64 | |
path: mandy-macos-aarch64-v.0.1.0 | |
- name: "Upload binary as an artifact (Macos X64)." | |
if: runner.os == 'Macos' && runner.arch == 'X64' | |
uses: actions/upload-artifact@v4 | |
with: | |
name: mandy-macos-x64 | |
path: mandy-macos-x64-v.0.1.0 | |
- name: "Upload binary as an artifact (Linux)." | |
if: runner.os == 'Linux' | |
uses: actions/upload-artifact@v4 | |
with: | |
name: mandy-linux-x64 | |
path: mandy-linux-v.0.1.0 |