Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 46 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ jobs:
runs-on: ubuntu-latest
permissions:
contents: write
env:
# Build the setup-ui in a dedicated step (below) so the cargo build doesn't
# depend on pnpm being resolvable on PATH from build.rs.
DISCRAKT_SKIP_UI_BUILD: "1"

steps:
- name: Checkout
Expand All @@ -22,6 +26,11 @@ jobs:
with:
targets: "aarch64-unknown-linux-gnu, x86_64-unknown-linux-musl"

# rust-toolchain.toml pins a version-named toolchain, so the cross targets
# must be added to it (the action adds them to `stable`, which cargo ignores).
- name: Add cross-compile targets to the pinned toolchain
run: rustup target add aarch64-unknown-linux-gnu x86_64-unknown-linux-musl

- name: Rust cache
uses: Swatinem/rust-cache@v2

Expand All @@ -41,6 +50,13 @@ jobs:
- name: Set up Node and pnpm
uses: jdx/mise-action@v2

- name: Build setup-ui
shell: bash
working-directory: setup-ui
run: |
mise exec -- pnpm install --frozen-lockfile
mise exec -- pnpm run build

- name: Build amd64
run: cargo build --release

Expand Down Expand Up @@ -138,6 +154,10 @@ jobs:
runs-on: windows-latest
permissions:
contents: write
env:
# Build the setup-ui in a dedicated step (below); on Windows the mise shims
# aren't on PATH for build.rs, so let cargo reuse the prebuilt dist instead.
DISCRAKT_SKIP_UI_BUILD: "1"

steps:
- name: Checkout
Expand All @@ -161,6 +181,13 @@ jobs:
- name: Set up Node and pnpm
uses: jdx/mise-action@v2

- name: Build setup-ui
shell: bash
working-directory: setup-ui
run: |
mise exec -- pnpm install --frozen-lockfile
mise exec -- pnpm run build

- name: Build win64
env:
DISCRAKT_VERSION: ${{ steps.version.outputs.VERSION }}
Expand Down Expand Up @@ -196,6 +223,9 @@ jobs:
contents: write
env:
MACOSX_DEPLOYMENT_TARGET: "10.13"
# Build the setup-ui in a dedicated step (below) so the per-target cargo
# builds reuse one prebuilt dist instead of invoking pnpm from build.rs.
DISCRAKT_SKIP_UI_BUILD: "1"

steps:
- name: Checkout
Expand All @@ -206,6 +236,11 @@ jobs:
with:
targets: "aarch64-apple-darwin, x86_64-apple-darwin"

# rust-toolchain.toml pins a version-named toolchain, so the cross targets
# must be added to it (the action adds them to `stable`, which cargo ignores).
- name: Add cross-compile targets to the pinned toolchain
run: rustup target add aarch64-apple-darwin x86_64-apple-darwin

- name: Rust cache
uses: Swatinem/rust-cache@v2

Expand All @@ -219,6 +254,13 @@ jobs:
- name: Set up Node and pnpm
uses: jdx/mise-action@v2

- name: Build setup-ui
shell: bash
working-directory: setup-ui
run: |
mise exec -- pnpm install --frozen-lockfile
mise exec -- pnpm run build

- name: Build arm64 (Apple Silicon)
run: cargo build --release --target=aarch64-apple-darwin

Expand Down Expand Up @@ -438,6 +480,8 @@ jobs:

update-winget:
needs: publish-win
# Skip package-manager updates for pre-releases (e.g. v4.0.0-beta.1).
if: ${{ !github.event.release.prerelease }}
runs-on: ubuntu-latest

steps:
Expand All @@ -450,6 +494,8 @@ jobs:

update-homebrew:
needs: publish-macos
# Skip package-manager updates for pre-releases (e.g. v4.0.0-beta.1).
if: ${{ !github.event.release.prerelease }}
runs-on: ubuntu-latest

steps:
Expand Down
6 changes: 6 additions & 0 deletions rust-toolchain.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Pin the toolchain so local and CI use the exact same rustc/clippy/rustfmt.
# Bump this deliberately (and run `cargo clippy` locally) when adopting a new
# Rust release, rather than letting CI's `stable` drift ahead of contributors.
[toolchain]
channel = "1.96.0"
components = ["clippy", "rustfmt"]
2 changes: 1 addition & 1 deletion src/plex_auth.rs
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ pub fn discover_plex_server(
if candidates.is_empty() {
return Err("No Plex servers found for this account".to_string());
}
candidates.sort_by(|a, b| b.0.cmp(&a.0));
candidates.sort_by_key(|b| std::cmp::Reverse(b.0));

// Probe each in preference order; use the first that responds.
let probe = Agent::config_builder()
Expand Down
Loading