Skip to content

add publish target for Windows #5

add publish target for Windows

add publish target for Windows #5

Workflow file for this run

name: Rust
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
env:
CARGO_TERM_COLOR: always
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Install alsa
run: sudo apt-get install -y librust-alsa-sys-dev
- name: Install dependencies for libudev
run: sudo apt install -y pkg-config libusb-1.0-0-dev libftdi1-dev
- name: Install libudev
run: sudo apt-get install libudev-dev
- name: suggested on stack overflow to install after libudev
run: cargo install cargo-flash
- uses: actions/checkout@v3
- name: Build
run: cargo build --verbose
- name: Run tests
run: cargo test --verbose
publish:
runs-on: windows-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
- name: Build Release
run: cargo build --release
- name: Create Artifact Directory
run: mkdir artifact
- name: Copy Executable
run: cp target/release/shawzin.exe artifact/
- name: Copy Sounds Folder
run: cp -r sounds/ artifact/sounds/
- name: Zip Artifact
run: |
cd artifact
7z a ../shawzin.zip *
- name: Upload Artifact
uses: actions/upload-artifact@v2
with:
name: shawzin
path: shawzin.zip