Skip to content

Commit

Permalink
Update ci.yml Ai copy quick
Browse files Browse the repository at this point in the history
  • Loading branch information
Veha0001 authored Jan 12, 2025
1 parent 18c668a commit 12968d1
Showing 1 changed file with 16 additions and 12 deletions.
28 changes: 16 additions & 12 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,17 @@
name: CI

on: [ push , pull_request ]
on: [push, pull_request]

permissions:
contents: write

jobs:
windows-build:
runs-on: windows-latest
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
Expand All @@ -19,35 +23,35 @@ jobs:
~/.cargo
~/.rustup
target
key: cargo-${{ hashFiles('**/Cargo.lock') }}
key: cargo-${{ matrix.os }}-${{ hashFiles('**/Cargo.lock') }}

- name: Setup Rust
shell: pwsh
shell: ${{ matrix.os == 'windows-latest' && 'pwsh' || 'bash' }}
run: |
rustup default stable
rustup target add x86_64-pc-windows-msvc
rustup target add ${{ matrix.target }}
rustc -vV
cargo -vV
- name: Build
shell: pwsh
shell: ${{ matrix.os == 'windows-latest' && 'pwsh' || 'bash' }}
run: |
cargo build
cargo build --release
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: BinaryPatch
name: BinaryPatch-${{ matrix.os }}
path: |
target/debug/Patcher.exe
target/release/Patcher.exe
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/Patcher.exe
files: target/release/${{ matrix.os == 'windows-latest' && 'Patcher.exe' || 'Patcher' }}

0 comments on commit 12968d1

Please sign in to comment.