From 07f48be27ee8f224dbce5e8b39e57af47875bf63 Mon Sep 17 00:00:00 2001 From: sandikodev Date: Thu, 9 Apr 2026 22:05:45 +0700 Subject: [PATCH] ci: update deprecated actions to latest versions MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - actions/cache@v3 → v4 - actions/upload-artifact@v3 → v4 - consolidate 3 separate cache steps into one Fixes CI failure on all build matrix jobs. --- .github/workflows/ci.yml | 70 +++++++++++++++++----------------------- 1 file changed, 30 insertions(+), 40 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a1713e1..8bbdfc8 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -13,63 +13,55 @@ jobs: test: name: Test runs-on: ubuntu-latest - + steps: - uses: actions/checkout@v4 - + - name: Install Rust uses: dtolnay/rust-toolchain@stable with: components: rustfmt, clippy - + - name: Install system dependencies run: | sudo apt-get update sudo apt-get install -y ffmpeg curl - - - name: Cache cargo registry - uses: actions/cache@v3 - with: - path: ~/.cargo/registry - key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }} - - - name: Cache cargo index - uses: actions/cache@v3 - with: - path: ~/.cargo/git - key: ${{ runner.os }}-cargo-index-${{ hashFiles('**/Cargo.lock') }} - - - name: Cache cargo build - uses: actions/cache@v3 + + - name: Cache cargo + uses: actions/cache@v4 with: - path: target - key: ${{ runner.os }}-cargo-build-target-${{ hashFiles('**/Cargo.lock') }} - + path: | + ~/.cargo/registry + ~/.cargo/git + target + key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} + restore-keys: ${{ runner.os }}-cargo- + - name: Check formatting run: cargo fmt --all -- --check - + - name: Run clippy run: cargo clippy --all-targets --all-features -- -D warnings - + - name: Run tests run: cargo test --verbose - + - name: Build release run: cargo build --release --verbose security: name: Security Audit runs-on: ubuntu-latest - + steps: - uses: actions/checkout@v4 - + - name: Install Rust uses: dtolnay/rust-toolchain@stable - + - name: Install cargo-audit run: cargo install cargo-audit - + - name: Run security audit run: cargo audit @@ -79,34 +71,32 @@ jobs: strategy: matrix: os: [ubuntu-latest, windows-latest, macos-latest] - + steps: - uses: actions/checkout@v4 - + - name: Install Rust uses: dtolnay/rust-toolchain@stable - + - name: Install system dependencies (Ubuntu) if: matrix.os == 'ubuntu-latest' run: | sudo apt-get update sudo apt-get install -y ffmpeg curl - + - name: Install system dependencies (macOS) if: matrix.os == 'macos-latest' - run: | - brew install ffmpeg curl - + run: brew install ffmpeg curl + - name: Install system dependencies (Windows) if: matrix.os == 'windows-latest' - run: | - choco install ffmpeg curl - + run: choco install ffmpeg curl + - name: Build run: cargo build --release --verbose - + - name: Upload artifacts - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: auto-clipper-${{ matrix.os }} path: |