Update rust.yml #5
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: Rust | |
on: | |
push: | |
branches: [ "main" ] | |
pull_request: | |
branches: [ "main" ] | |
env: | |
CARGO_TERM_COLOR: always | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Build | |
run: cargo build --verbose | |
- name: Run tests | |
run: cargo test --verbose | |
rust_release_binary: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Rust Release binary | |
uses: rust-build/[email protected] | |
with: | |
RUSTTARGET: x86_64-unknown-linux-gnu # Set your target platform | |
EXTRA_FILES: '' # List any extra files to include (optional) | |
SRC_DIR: '' # Path to directory containing Cargo.toml (optional, defaults to project root) | |
ARCHIVE_TYPES: 'zip' # List of archive types to publish the binaries with (optional) | |
ARCHIVE_NAME: 'oi' # Full name of archive to upload (optional, specify file extension) | |
PRE_BUILD: '' # Relative path of script to run before building (optional) | |
POST_BUILD: '' # Relative path of script to run after building (optional) | |
MINIFY: 'false' # If set to "true", the resulting binary will be stripped and compressed by UPX | |
TOOLCHAIN_VERSION: 'stable' # The Rust toolchain version to use (optional) | |
UPLOAD_MODE: 'release' # What method to use to upload compiled binaries (release or none) | |