name: build-plugin on: workflow_dispatch: push: branches: [ main ] paths: - "src/**" - Cargo.lock - rust-toolchain.toml - flake.nix - flake.lock - shell.nix pull_request: branches: [ main ] paths: - "src/**" - Cargo.lock - rust-toolchain.toml - flake.nix - flake.lock - shell.nix env: CARGO_TERM_COLOR: always jobs: build: runs-on: ubuntu-latest strategy: matrix: profile: [ "dev", "release" ] env: BUILD_NAME: ${{ matrix.profile == 'dev' && 'debug' || matrix.profile }} steps: - uses: actions/checkout@v4 - name: Install Nix uses: nixbuild/nix-quick-install-action@v28 - name: Check run: nix develop --command cargo clippy --profile ${{ matrix.profile }} -- -D warnings - name: Build run: nix develop --command cargo build --profile ${{ matrix.profile }} - name: Upload build uses: actions/upload-artifact@v4 with: name: mpv-rpc_${{ env.BUILD_NAME }} path: target/${{ env.BUILD_NAME }}/libmpv_rpc.so