Update main.yml #2
Workflow file for this run
This file contains hidden or 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: CI | |
# (optional) explicitly allow read access to public actions | |
permissions: | |
contents: read | |
on: | |
push: | |
# match tags like "v1.0.0", "v2.3.4-beta", etc. | |
tags: | |
- 'v*' | |
jobs: | |
build-windows-msvc: | |
runs-on: windows-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Cache Rust crates | |
uses: actions/cache@v3 | |
with: | |
path: | | |
~/.cargo/registry | |
~/.cargo/git | |
target | |
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} | |
restore-keys: | | |
${{ runner.os }}-cargo- | |
- name: Install Rust toolchain (MSVC) | |
uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: stable | |
target: x86_64-pc-windows-msvc | |
default: true | |
- name: Build (release) | |
uses: actions-rs/cargo@v1 | |
with: | |
command: build | |
args: --release | |
- name: Upload artifact | |
# pin to v2 until v3 is fully available on your runners | |
uses: actions/upload-artifact@v2 | |
with: | |
name: windows-msvc-release | |
path: target/x86_64-pc-windows-msvc/release/ |