Update ci.yml Ai copy quick #48
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: CI | ||
on: [push, pull_request] | ||
permissions: | ||
contents: write | ||
jobs: | ||
build: | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
os: [windows-latest, ubuntu-latest] | ||
target: [x86_64-pc-windows-msvc, x86_64-unknown-linux-gnu] | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
- name: Cargo Caches | ||
uses: actions/cache@v4 | ||
with: | ||
path: | | ||
~/.cargo | ||
~/.rustup | ||
target | ||
key: cargo-${{ matrix.os }}-${{ hashFiles('**/Cargo.lock') }} | ||
- name: Setup Rust | ||
shell: ${{ matrix.os == 'windows-latest' && 'pwsh' || 'bash' }} | ||
Check failure on line 29 in .github/workflows/ci.yml
|
||
run: | | ||
rustup default stable | ||
rustup target add ${{ matrix.target }} | ||
rustc -vV | ||
cargo -vV | ||
- name: Build | ||
shell: ${{ matrix.os == 'windows-latest' && 'pwsh' || 'bash' }} | ||
run: | | ||
cargo build | ||
cargo build --release | ||
- name: Upload artifact | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: BinaryPatch-${{ matrix.os }} | ||
path: | | ||
target/debug/${{ matrix.os == 'windows-latest' && 'Patcher.exe' || 'Patcher' }} | ||
target/release/${{ matrix.os == 'windows-latest' && 'Patcher.exe' || 'Patcher' }} | ||
if-no-files-found: error | ||
- name: Release | ||
if: ${{ github.event_name == 'push' }} | ||
uses: softprops/[email protected] | ||
with: | ||
name: Binary Patcher | ||
tag_name: latest-nightly | ||
files: target/release/${{ matrix.os == 'windows-latest' && 'Patcher.exe' || 'Patcher' }} |