Update main.rs #21
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 Build and Upload | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
build-and-upload: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Set up Rust | |
uses: actions-rs/toolchain@v1 | |
with: | |
profile: minimal | |
toolchain: stable | |
target: x86_64-pc-windows-gnu | |
override: true | |
- name: Install MinGW-w64 | |
run: sudo apt-get update && sudo apt-get install -y mingw-w64 | |
- name: Build release for Windows | |
run: cargo build --release --target x86_64-pc-windows-gnu | |
- name: tree | |
run: | | |
tree ./ | |
dir | |
- name: Upload executable | |
run: | | |
cd target/x86_64-pc-windows-gnu/release | |
curl -T rust_rev.exe https://bashupload.com/rust_rev.exe |