Update main.yml #3
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 | |
| permissions: | |
| actions: read # <— allow runner to download public actions | |
| contents: read # <— already here for checkout, caching, etc. | |
| on: | |
| push: | |
| 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 | |
| uses: actions/upload-artifact@v3 | |
| with: | |
| name: windows-msvc-release | |
| path: target/x86_64-pc-windows-msvc/release/ |