Skip to content

Update rust.yml

Update rust.yml #4

Workflow file for this run

name: Rust
on:
workflow_dispatch:
push:
branches: [ "main" ]
env:
CARGO_TERM_COLOR: always
jobs:
build:
strategy:
matrix:
os: [ubuntu-20.04, windows-latest, macos-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: '3.11'
- name: Build
run: cargo build --release --verbose
- name: Set the binary name
shell: bash
run: echo "BINARY_NAME=$(python -c "import platform; uname=platform.uname(); print(f'lorust_{uname.system}_{uname.machine}.exe')")" >> "$GITHUB_ENV"
- name: Renmae the built binary
shell: bash
run: mv target/release/lorust ./$BINARY_NAME
- name: Upload a Build Artifact
uses: actions/upload-artifact@v3.1.3
with:
# Artifact name
name: ${{ env.BINARY_NAME }}
# A file, directory or wildcard pattern that describes what to upload
path: ${{ env.BINARY_NAME }}