Skip to content

Create main.yml

Create main.yml #4

Workflow file for this run

name: Rust
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
env:
CARGO_TERM_COLOR: always
defaults:
run:
working-directory: backend
jobs:
build:
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
- name: Install nightly toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: nightly
override: true
- name: Build
uses: actions-rs/cargo@v1
with:
command: build
args: --release --manifest-path backend/Cargo.toml
- name: Test
uses: actions-rs/cargo@v1
with:
command: test
args: --manifest-path backend/Cargo.toml
- name: Upload artifact
uses: actions/upload-artifact@v3
with:
name: rust-binary
path: backend/target/release/*.exe