Terminal interface to find, download, and stream movies, TV shows, and live TV using local media players.
refactor: overhaul CI workflows to standardize hygiene checks, improve build stability, and refine release orchestration
Samir Hossainsb145edb6f3e6
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.ymlindex aa3e632..5205264 100644--- a/.github/workflows/ci.yml+++ b/.github/workflows/ci.yml@@ -13,13 +13,9 @@ concurrency:cancel-in-progress: truejobs:- quality:- name: Quality (${{ matrix.os }})- runs-on: ${{ matrix.os }}- strategy:- fail-fast: false- matrix:- os: [ubuntu-latest, macos-latest, windows-latest]+ hygiene:+ name: Hygiene+ runs-on: ubuntu-lateststeps:- uses: actions/checkout@v7- uses: dtolnay/rust-toolchain@stable@@ -28,16 +24,49 @@ jobs:components: rustfmt, clippy- uses: Swatinem/rust-cache@v2with:- prefix-key: "ci-quality"+ prefix-key: "ci-hygiene"- run: cargo fmt --check- run: cargo clippy --all-targets --locked -- -D warnings- name: Audit dependencies- if: matrix.os == 'ubuntu-latest'uses: taiki-e/install-action@v2with:tool: cargo-audit- - if: matrix.os == 'ubuntu-latest'- run: cargo audit+ - run: cargo audit- name: Verify package- if: matrix.os == 'ubuntu-latest'run: cargo package --locked++ build-and-test:+ name: Build and test (${{ matrix.os }})+ runs-on: ${{ matrix.os }}+ strategy:+ fail-fast: false+ matrix:+ os: [ubuntu-latest, macos-latest, windows-latest]+ steps:+ - uses: actions/checkout@v7+ - uses: dtolnay/rust-toolchain@stable+ with:+ toolchain: 1.90.0+ - uses: Swatinem/rust-cache@v2+ with:+ prefix-key: "ci-build-test-${{ matrix.os }}"+ - run: cargo build --locked+ - run: cargo test --locked++ android-termux:+ name: Android / Termux build+ runs-on: ubuntu-latest+ steps:+ - uses: actions/checkout@v7+ - uses: dtolnay/rust-toolchain@stable+ with:+ toolchain: 1.90.0+ targets: aarch64-linux-android+ - uses: Swatinem/rust-cache@v2+ with:+ prefix-key: "ci-android-termux"+ - name: Install cross+ uses: taiki-e/install-action@v2+ with:+ tool: cross+ - run: cross build --locked --target aarch64-linux-androiddiff --git a/.github/workflows/homebrew.yml b/.github/workflows/homebrew.ymlindex 999656f..0feb95d 100644--- a/.github/workflows/homebrew.yml+++ b/.github/workflows/homebrew.yml@@ -17,15 +17,13 @@ jobs:- name: Checkout repositoryuses: actions/checkout@v7with:+ ref: ${{ github.event_name == 'workflow_dispatch' && github.ref || github.event.workflow_run.head_sha }}fetch-depth: 0- name: Get Release Dataid: releaserun: |- VERSION="${{ github.event.release.tag_name }}"- if [ -z "$VERSION" ]; then- VERSION=$(curl -sI "https://github.com/${{ github.repository }}/releases/latest" | grep -i '^location:' | awk -F '/' '{print $NF}' | tr -d '\r')- fi+ VERSION="v$(grep '^version =' Cargo.toml | head -1 | awk -F'"' '{print $2}')"CLEAN_VERSION="${VERSION#v}"echo "version=$CLEAN_VERSION" >> $GITHUB_OUTPUTecho "tag=$VERSION" >> $GITHUB_OUTPUTdiff --git a/.github/workflows/publish.yml b/.github/workflows/publish.ymlindex 228e901..0080322 100644--- a/.github/workflows/publish.yml+++ b/.github/workflows/publish.yml@@ -17,15 +17,24 @@ jobs:if: ${{ github.event_name == 'workflow_dispatch' || github.event.workflow_run.conclusion == 'success' }}runs-on: ubuntu-lateststeps:- - name: Determine Ref+ - name: Determine refid: refrun: |- REF="${{ github.event.inputs.tag || github.event.release.tag_name || github.ref_name }}"+ if [ "${{ github.event_name }}" = "workflow_dispatch" ] && [ -n "${{ github.event.inputs.tag }}" ]; then+ REF="${{ github.event.inputs.tag }}"+ else+ REF="${{ github.event.workflow_run.head_sha }}"+ fiecho "target_ref=$REF" >> $GITHUB_OUTPUT- uses: actions/checkout@v7with:ref: ${{ steps.ref.outputs.target_ref }}++ - name: Confirm version+ run: |+ VERSION=$(grep '^version =' Cargo.toml | head -1 | awk -F'"' '{print $2}')+ echo "Publishing version $VERSION from ${{ steps.ref.outputs.target_ref }}"- name: Install Rustuses: dtolnay/rust-toolchain@stablediff --git a/.github/workflows/release.yml b/.github/workflows/release.ymlindex b6bb223..cf2ea4b 100644--- a/.github/workflows/release.yml+++ b/.github/workflows/release.yml@@ -35,8 +35,8 @@ jobs:env:GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}- quality:- name: Release quality gate+ preflight:+ name: Release preflightneeds: check-versionif: needs.check-version.outputs.is_new == 'true'runs-on: ubuntu-latest@@ -45,25 +45,19 @@ jobs:- uses: dtolnay/rust-toolchain@stablewith:toolchain: 1.90.0- components: rustfmt, clippy+ targets: aarch64-linux-android- uses: Swatinem/rust-cache@v2with:- prefix-key: "release-quality"- - run: cargo fmt --check- - run: cargo clippy --all-targets --locked -- -D warnings- - uses: taiki-e/install-action@v2- with:- tool: cargo-audit- - run: cargo audit+ prefix-key: "release-preflight"- run: cargo package --locked- - uses: dtolnay/rust-toolchain@stable+ - uses: taiki-e/install-action@v2with:- toolchain: 1.90.0- - run: cargo check --all-targets --locked+ tool: cross+ - run: cross build --locked --target aarch64-linux-androidbuild:name: Build ${{ matrix.target }}- needs: [check-version, quality]+ needs: [check-version, preflight]if: needs.check-version.outputs.is_new == 'true'runs-on: ${{ matrix.os }}strategy: