From d2031b52dfc17fd5d4551c8ae4865e6f9514d1b3 Mon Sep 17 00:00:00 2001 From: alexbowe Date: Tue, 15 Sep 2026 00:51:36 -0700 Subject: [PATCH 1/2] fix: exchange Steam credentials for token-only depot login --- README.md | 10 ++ src/SteamDepotFs/Program.cs | 65 +++++----- src/SteamDepotFs/SteamLogin.cs | 66 ++++++++++ tests/SteamDepotFs.Tests/SteamLoginTests.cs | 127 ++++++++++++++++++++ 4 files changed, 236 insertions(+), 32 deletions(-) create mode 100644 src/SteamDepotFs/SteamLogin.cs create mode 100644 tests/SteamDepotFs.Tests/SteamLoginTests.cs diff --git a/README.md b/README.md index eb8fd77..152b10d 100644 --- a/README.md +++ b/README.md @@ -124,6 +124,16 @@ Anonymous login is used unless credentials are provided. Credentials can be pass | `--login-id` | `STEAM_LOGIN_ID` | | `--remember-password` | `STEAM_REMEMBER_PASSWORD=1` | +Username/password login obtains a fresh Steam client refresh token in memory, then +uses that token for depot access. `STEAM_ACCESS_TOKEN` (or `--access-token`) +accepts an existing client refresh token and takes precedence over any password. +Tokens are not printed or saved. Each command authenticates independently. + +Login is noninteractive. Accounts with Steam Guard must supply an email code or +mobile authenticator code using the options above; missing or rejected codes +fail instead of prompting. Prefer environment variables to password/token flags +so credentials do not appear in command arguments. + Private branches may also require: ```bash diff --git a/src/SteamDepotFs/Program.cs b/src/SteamDepotFs/Program.cs index 4abe1cf..75b6025 100644 --- a/src/SteamDepotFs/Program.cs +++ b/src/SteamDepotFs/Program.cs @@ -254,7 +254,7 @@ list [--limit N] List paths from the manifest. --password VALUE Steam password. Env: STEAM_PASSWORD. --auth-code VALUE Steam Guard email code. Env: STEAM_AUTH_CODE. --two-factor-code VALUE Steam mobile auth code. Env: STEAM_TWO_FACTOR_CODE. - --access-token VALUE Steam access token. Env: STEAM_ACCESS_TOKEN. + --access-token VALUE Steam client refresh token; overrides password. Env: STEAM_ACCESS_TOKEN. --login-id ID Optional SteamKit login id. Env: STEAM_LOGIN_ID. --remember-password Set SteamKit remember password flag. --timeout SECONDS Overall command timeout. Default: 300. @@ -895,11 +895,8 @@ public static async Task ConnectAsync(SteamCredentials credentials var loggedOn = new TaskCompletionSource(TaskCreationOptions.RunContinuationsAsynchronously); var disconnected = new TaskCompletionSource(TaskCreationOptions.RunContinuationsAsynchronously); - using var connectedSub = session._callbacks.Subscribe(callback => - { - connected.TrySetResult(callback); - session.LogOn(credentials); - }); + using var connectedSub = session._callbacks.Subscribe( + callback => connected.TrySetResult(callback)); using var loggedOnSub = session._callbacks.Subscribe(callback => { @@ -913,28 +910,35 @@ public static async Task ConnectAsync(SteamCredentials credentials } }); - using var disconnectedSub = session._callbacks.Subscribe(callback => - { - disconnected.TrySetResult(callback); - }); + using var disconnectedSub = session._callbacks.Subscribe( + callback => disconnected.TrySetResult(callback)); - client.Connect(null!); - var first = await Task.WhenAny(connected.Task, disconnected.Task).WaitAsync(cancellationToken); - if (first == disconnected.Task) + try { - throw new IOException("Steam disconnected before CM connection completed."); - } + client.Connect(null!); + var first = await Task.WhenAny(connected.Task, disconnected.Task).WaitAsync(cancellationToken); + if (first == disconnected.Task) + { + throw new IOException("Steam disconnected before CM connection completed."); + } - await connected.Task.WaitAsync(cancellationToken); + await connected.Task.WaitAsync(cancellationToken); + await session.LogOnAsync(credentials, cancellationToken); - var completed = await Task.WhenAny(loggedOn.Task, disconnected.Task).WaitAsync(cancellationToken); - if (completed == disconnected.Task) + var completed = await Task.WhenAny(loggedOn.Task, disconnected.Task).WaitAsync(cancellationToken); + if (completed == disconnected.Task) + { + throw new IOException("Steam disconnected before logon completed."); + } + + await loggedOn.Task.WaitAsync(cancellationToken); + return session; + } + catch { - throw new IOException("Steam disconnected before logon completed."); + await session.DisposeAsync(); + throw; } - - await loggedOn.Task.WaitAsync(cancellationToken); - return session; } public async Task GetDepotKeyAsync(uint appId, uint depotId, CancellationToken cancellationToken) @@ -1035,7 +1039,7 @@ public async ValueTask DisposeAsync() _callbackLoopCts.Dispose(); } - private void LogOn(SteamCredentials credentials) + private async Task LogOnAsync(SteamCredentials credentials, CancellationToken cancellationToken) { if (credentials.IsAnonymous) { @@ -1043,16 +1047,13 @@ private void LogOn(SteamCredentials credentials) return; } - _user.LogOn(new SteamUser.LogOnDetails + var details = await SteamLogin.CreateLogOnDetailsAsync(credentials, async (authDetails, ct) => { - Username = credentials.Username, - Password = credentials.Password, - AccessToken = credentials.AccessToken, - AuthCode = credentials.AuthCode, - TwoFactorCode = credentials.TwoFactorCode, - LoginID = credentials.LoginId, - ShouldRememberPassword = credentials.RememberPassword - }); + var authSession = await Client.Authentication.BeginAuthSessionViaCredentialsAsync(authDetails).WaitAsync(ct); + var result = await authSession.PollingWaitForResultAsync(ct).WaitAsync(ct); + return (result.AccountName, result.RefreshToken); + }, cancellationToken); + _user.LogOn(details); } private async Task RunCallbacksAsync() diff --git a/src/SteamDepotFs/SteamLogin.cs b/src/SteamDepotFs/SteamLogin.cs new file mode 100644 index 0000000..ff5f9d6 --- /dev/null +++ b/src/SteamDepotFs/SteamLogin.cs @@ -0,0 +1,66 @@ +using SteamKit2; +using SteamKit2.Authentication; + +internal static class SteamLogin +{ + public static async Task CreateLogOnDetailsAsync( + SteamCredentials credentials, + Func> authenticate, + CancellationToken cancellationToken) + { + cancellationToken.ThrowIfCancellationRequested(); + var accountName = credentials.Username; + var refreshToken = credentials.AccessToken; + if (string.IsNullOrWhiteSpace(refreshToken)) + { + if (string.IsNullOrWhiteSpace(accountName) || string.IsNullOrEmpty(credentials.Password)) + { + throw new ArgumentException("Steam login requires a username and password, or a username and access token."); + } + + var details = new AuthSessionDetails + { + Username = accountName, + Password = credentials.Password, + IsPersistentSession = credentials.RememberPassword, + DeviceFriendlyName = "SteamDepotFS", + Authenticator = new SteamGuardCodes(credentials.AuthCode, credentials.TwoFactorCode) + }; + (accountName, refreshToken) = await authenticate(details, cancellationToken).WaitAsync(cancellationToken); + } + + return new SteamUser.LogOnDetails + { + Username = accountName, + AccessToken = refreshToken, + LoginID = credentials.LoginId, + ShouldRememberPassword = credentials.RememberPassword + }; + } +} + +internal sealed class SteamGuardCodes(string? emailCode, string? deviceCode) : IAuthenticator +{ + public Task GetDeviceCodeAsync(bool previousCodeWasIncorrect) + => GetCodeAsync(deviceCode, "--two-factor-code / STEAM_TWO_FACTOR_CODE", previousCodeWasIncorrect); + + public Task GetEmailCodeAsync(string email, bool previousCodeWasIncorrect) + => GetCodeAsync(emailCode, "--auth-code / STEAM_AUTH_CODE", previousCodeWasIncorrect); + + public Task AcceptDeviceConfirmationAsync() => Task.FromResult(false); + + private static Task GetCodeAsync(string? code, string option, bool previousCodeWasIncorrect) + { + if (previousCodeWasIncorrect) + { + throw new UnauthorizedAccessException($"Steam rejected the supplied Guard code. Retry with a new {option}."); + } + + if (string.IsNullOrWhiteSpace(code)) + { + throw new UnauthorizedAccessException($"Steam Guard requires {option}. Login does not prompt for input."); + } + + return Task.FromResult(code); + } +} diff --git a/tests/SteamDepotFs.Tests/SteamLoginTests.cs b/tests/SteamDepotFs.Tests/SteamLoginTests.cs new file mode 100644 index 0000000..b32040e --- /dev/null +++ b/tests/SteamDepotFs.Tests/SteamLoginTests.cs @@ -0,0 +1,127 @@ +using SteamKit2.Authentication; +using Xunit; + +namespace SteamDepotFs.Tests; + +public sealed class SteamLoginTests +{ + private static SteamCredentials Credentials => new("account", "password", null, null, null, 42, false); + + [Theory] + [InlineData(null)] + [InlineData("")] + [InlineData("stale-password")] + public async Task SuppliedToken_BypassesPasswordAuthentication(string? password) + { + var credentials = Credentials with + { + Password = password, + AccessToken = "supplied-token", + AuthCode = "old-email-code", + TwoFactorCode = "old-device-code" + }; + + var result = await SteamLogin.CreateLogOnDetailsAsync(credentials, + (_, _) => throw new InvalidOperationException("Token login must not exchange credentials."), + CancellationToken.None); + + Assert.Equal("account", result.Username); + Assert.Equal("supplied-token", result.AccessToken); + Assert.Null(result.Password); + Assert.Null(result.AuthCode); + Assert.Null(result.TwoFactorCode); + Assert.Equal(42U, result.LoginID); + } + + [Theory] + [InlineData(false)] + [InlineData(true)] + public async Task PasswordAuthentication_UsesReturnedAccountAndRefreshToken(bool rememberPassword) + { + using var cancellation = new CancellationTokenSource(); + var credentials = Credentials with { RememberPassword = rememberPassword }; + var result = await SteamLogin.CreateLogOnDetailsAsync(credentials, (details, token) => + { + Assert.Equal("account", details.Username); + Assert.Equal("password", details.Password); + Assert.Equal(rememberPassword, details.IsPersistentSession); + Assert.IsType(details.Authenticator); + Assert.Equal(cancellation.Token, token); + return Task.FromResult(("canonical-account", "fresh-refresh-token")); + }, cancellation.Token); + + Assert.Equal("canonical-account", result.Username); + Assert.Equal("fresh-refresh-token", result.AccessToken); + Assert.Null(result.Password); + Assert.Equal(rememberPassword, result.ShouldRememberPassword); + } + + [Fact] + public async Task AuthenticationFailure_DoesNotFallBackToPasswordLogon() + { + var rejected = new UnauthorizedAccessException("Authentication rejected."); + var error = await Assert.ThrowsAsync(() => + SteamLogin.CreateLogOnDetailsAsync(Credentials, (_, _) => throw rejected, CancellationToken.None)); + + Assert.Same(rejected, error); + } + + [Fact] + public async Task CancelledAuthentication_StopsWaitingForExchange() + { + using var cancellation = new CancellationTokenSource(); + var pending = new TaskCompletionSource<(string, string)>(TaskCreationOptions.RunContinuationsAsynchronously); + var login = SteamLogin.CreateLogOnDetailsAsync(Credentials, (_, _) => pending.Task, cancellation.Token); + + cancellation.Cancel(); + + await Assert.ThrowsAnyAsync(() => login); + } + + [Theory] + [InlineData(null, "password")] + [InlineData("account", null)] + [InlineData("account", "")] + public async Task MissingCredentials_FailBeforeAuthentication(string? username, string? password) + { + await Assert.ThrowsAsync(() => SteamLogin.CreateLogOnDetailsAsync( + Credentials with { Username = username, Password = password }, + (_, _) => throw new InvalidOperationException("Incomplete credentials must not reach Steam."), + CancellationToken.None)); + } + + [Fact] + public async Task GuardCodes_UseConfiguredCodesInsteadOfDeviceApproval() + { + var guard = new SteamGuardCodes("email-code", "device-code"); + + Assert.False(await guard.AcceptDeviceConfirmationAsync()); + Assert.Equal("email-code", await guard.GetEmailCodeAsync("address", false)); + Assert.Equal("device-code", await guard.GetDeviceCodeAsync(false)); + } + + [Theory] + [InlineData(null)] + [InlineData("")] + [InlineData(" ")] + public async Task MissingGuardCodes_FailWithoutInteractiveInput(string? code) + { + var guard = new SteamGuardCodes(code, code); + + var emailError = await Assert.ThrowsAsync(() => guard.GetEmailCodeAsync("address", false)); + var deviceError = await Assert.ThrowsAsync(() => guard.GetDeviceCodeAsync(false)); + + Assert.Contains("STEAM_AUTH_CODE", emailError.Message); + Assert.Contains("STEAM_TWO_FACTOR_CODE", deviceError.Message); + Assert.False(await guard.AcceptDeviceConfirmationAsync()); + } + + [Fact] + public async Task RejectedGuardCodes_FailInsteadOfRetryingTheSameCode() + { + var guard = new SteamGuardCodes("email-code", "device-code"); + + await Assert.ThrowsAsync(() => guard.GetEmailCodeAsync("address", true)); + await Assert.ThrowsAsync(() => guard.GetDeviceCodeAsync(true)); + } +} From 5c1143e17a0c7d5742b1c8652bdb9df0ef974ab2 Mon Sep 17 00:00:00 2001 From: alexbowe Date: Tue, 15 Sep 2026 01:45:48 -0700 Subject: [PATCH 2/2] docs: clarify authentication and release versions --- CHANGELOG.md | 5 ++ README.md | 158 ++++++++++++++++++--------------------------------- 2 files changed, 59 insertions(+), 104 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index dfebef5..686a4d0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,10 @@ # Changelog +## Unreleased + +- Fix username/password login by exchanging credentials for an in-memory Steam + client refresh token; retain token login and noninteractive Steam Guard codes. + ## v0.2.0 Changes since v0.1.1: diff --git a/README.md b/README.md index 152b10d..f085d10 100644 --- a/README.md +++ b/README.md @@ -1,69 +1,37 @@ # SteamDepotFs -`SteamDepotFs` is a SteamKit-based, read-only Steam depot filesystem. It resolves depot manifests, downloads only the chunks needed for reads, and keeps decompressed chunks in a bounded on-disk cache. - -It was created for GitHub workflows that operate on Steam game files but have limited disk space. It can also be used anywhere a read-only, on-demand view of a depot is useful. +`SteamDepotFs` mounts Steam depots read-only, downloading chunks on demand into a bounded disk cache. ## Installation -For CI or other projects, download the release archive for the target platform. Release builds are self-contained and do not require the .NET SDK: - -```bash -version=0.2.0 -curl -L -o "SteamDepotFS-$version-linux-x64.tar.gz" \ - "https://github.com/raidertool/SteamDepotFS/releases/download/v$version/SteamDepotFS-$version-linux-x64.tar.gz" -tar -xzf "SteamDepotFS-$version-linux-x64.tar.gz" -``` - -Release assets use versioned names: - -| Platform | Asset | -| --- | --- | -| Windows x64 | `SteamDepotFS--win-x64.zip` | -| Windows arm64 | `SteamDepotFS--win-arm64.zip` | -| Linux x64 | `SteamDepotFS--linux-x64.tar.gz` | -| Linux arm64 | `SteamDepotFS--linux-arm64.tar.gz` | -| macOS Apple Silicon | `SteamDepotFS--osx-arm64.tar.gz` | -| macOS Intel | `SteamDepotFS--osx-x64.tar.gz` | - -For mounted filesystem access on Windows, install WinFsp 2.1 or later: - -https://winfsp.dev/rel/ - -For mounted filesystem access on Linux, install FUSE: +Download and extract a [release](https://github.com/raidertool/SteamDepotFS/releases) +for your platform. Release binaries are self-contained; no .NET installation is needed. -```bash -sudo apt-get update -sudo apt-get install -y fuse3 libfuse2 -sudo modprobe fuse || true -``` - -For mounted filesystem access on macOS, install macFUSE: +The v0.2.0 binaries predate the username/password login fix. For that fix, build +source containing commit `91a8cc1` ([PR #3](https://github.com/raidertool/SteamDepotFS/pull/3)). -https://macfuse.github.io/ +Only `mount` needs a filesystem driver; `smoke`, `list`, `inspect`, and `read` do not: -On macOS 15.4 or later with macFUSE 5 or later, mount under `/Volumes/` to use macFUSE's FSKit backend. Other macOS mount points use the kernel backend and may require approving the macFUSE system extension. +- **Windows:** [WinFsp 2.1+](https://winfsp.dev/rel/). +- **Linux (Ubuntu/Debian):** `sudo apt-get install -y fuse3 libfuse2`; load FUSE with `sudo modprobe fuse` if needed. +- **macOS:** [macFUSE](https://macfuse.github.io/). With macOS 15.4+ and macFUSE 5+, mount under `/Volumes/` for FSKit. Other paths use the kernel backend and may require system-extension approval. -The `smoke`, `list`, `inspect`, and `read` commands do not require WinFsp or FUSE. Only `mount` requires an OS filesystem driver. - -To build from source instead, install the .NET 8 SDK and run: +To build and test source, install the .NET 8 SDK, then run from the repository root: ```bash dotnet build src/SteamDepotFs/SteamDepotFs.csproj -c Release -``` - -Run the unit tests: - -```bash dotnet test tests/SteamDepotFs.Tests/SteamDepotFs.Tests.csproj -c Release ``` ## Usage +Run these examples from the extracted release directory. From the repository +root, replace `./SteamDepotFs` with `dotnet run --project src/SteamDepotFs -c Release --`. + List files in a depot: ```bash -dotnet run --project src/SteamDepotFs/SteamDepotFs.csproj -c Release -- list \ +./SteamDepotFs list \ --app \ --depot ``` @@ -71,7 +39,7 @@ dotnet run --project src/SteamDepotFs/SteamDepotFs.csproj -c Release -- list \ Read a file from a depot: ```bash -dotnet run --project src/SteamDepotFs/SteamDepotFs.csproj -c Release -- read \ +./SteamDepotFs read \ --app \ --depot \ --path \ @@ -83,7 +51,7 @@ Mount a depot read-only: ```bash mkdir -p /tmp/steam-depotfs -dotnet run --project src/SteamDepotFs/SteamDepotFs.csproj -c Release -- mount \ +./SteamDepotFs mount \ --app \ --depot \ --mount-point /tmp/steam-depotfs @@ -92,25 +60,16 @@ dotnet run --project src/SteamDepotFs/SteamDepotFs.csproj -c Release -- mount \ On Windows, use an unused drive letter or an empty directory mount point: ```powershell -SteamDepotFs.exe mount ` +.\SteamDepotFs.exe mount ` --app ` --depot ` --mount-point X: ``` -Unmount on Linux: +Unmount with `fusermount3 -u /tmp/steam-depotfs` on Linux or +`diskutil unmount ` on macOS. On Windows, stop the mount process with `Ctrl+C`. -```bash -fusermount3 -u /tmp/steam-depotfs -``` - -Unmount on macOS: - -```bash -diskutil unmount /tmp/steam-depotfs -``` - -Unmount on Windows by stopping the SteamDepotFS process, for example with `Ctrl+C` in the terminal running `mount`. +### Authentication Anonymous login is used unless credentials are provided. Credentials can be passed as arguments or environment variables: @@ -127,23 +86,22 @@ Anonymous login is used unless credentials are provided. Credentials can be pass Username/password login obtains a fresh Steam client refresh token in memory, then uses that token for depot access. `STEAM_ACCESS_TOKEN` (or `--access-token`) accepts an existing client refresh token and takes precedence over any password. -Tokens are not printed or saved. Each command authenticates independently. +Tokens are not printed or saved, including with `--remember-password`. +Each command authenticates independently; supply the username with either method. -Login is noninteractive. Accounts with Steam Guard must supply an email code or -mobile authenticator code using the options above; missing or rejected codes -fail instead of prompting. Prefer environment variables to password/token flags -so credentials do not appear in command arguments. +Login is noninteractive. If password login requests Steam Guard, supply an email +or mobile authenticator code. Device-approval prompts are unsupported. Prefer +environment variables so credentials do not appear in command arguments. -Private branches may also require: +Use `--branch NAME` to select a branch and `--branch-password-hash HASH` when +required. `--manifest ID` pins a specific snapshot instead of resolving the branch. -```bash ---manifest --branch --branch-password-hash -``` +### Cache Cache limits use explicit byte caps. Suffixes `K`, `M`, `G`, and `T` are accepted: ```bash -dotnet run --project src/SteamDepotFs/SteamDepotFs.csproj -c Release -- mount \ +./SteamDepotFs mount \ --app \ --depot \ --mount-point /tmp/steam-depotfs \ @@ -155,62 +113,54 @@ dotnet run --project src/SteamDepotFs/SteamDepotFs.csproj -c Release -- mount \ --read-ahead-chunks 1 ``` -`--cache-max-bytes` is the hard cap. `--cache-low-watermark` is the cache size to return to after eviction, not the amount of free disk space to keep. For example, with `--cache-max-bytes 8G` and `--cache-low-watermark 6G`, the cache can grow to 8 GiB; once a new chunk would exceed that cap, old chunks are evicted until the cache is back near 6 GiB. - -`--cache-min-free-bytes` is the free-space guard for the filesystem that contains the cache. If a single chunk is larger than the cache cap, it is served without being stored. - -`--max-chunk-concurrency` bounds concurrent chunk fetches and cache-miss CDN downloads across foreground reads and read-ahead. `--read-ahead-chunks` controls how many following depot chunks are prefetched after a read; set it to `0` to disable read-ahead. +The cache grows to `--cache-max-bytes`, then evicts toward `--cache-low-watermark`. +`--cache-min-free-bytes` guards minimum free disk space. Oversized chunks are served +without caching. `--max-chunk-concurrency` limits concurrent fetches across reads +and prefetching; `--read-ahead-chunks 0` disables prefetching. ## Testing -The default public smoke target is Spacewar: - -- app `480` -- depot `481` -- branch `public` - -That depot is small and works anonymously, so it is useful for validating Steam login, manifest resolution, CDN downloads, cache reuse, and mounting before testing private depots. - -Run the public test script: +The [public test](scripts/ci/test-steam-depotfs-public.sh) uses Spacewar +(app `480`, depot `481`, branch `public`) anonymously: ```bash CACHE_MAX_BYTES=8G CACHE_LOW_WATERMARK=6G CACHE_MIN_FREE_BYTES=2G REQUIRE_FUSE=1 \ scripts/ci/test-steam-depotfs-public.sh ``` -To compare read-ahead and chunk-concurrency settings against a real depot path, run the benchmark matrix script: +Compare prefetching and concurrency with the [benchmark script](scripts/bench/read-matrix.sh): ```bash scripts/bench/read-matrix.sh ``` -The script defaults to `--read-ahead-chunks` values `0 1 2`, `--max-chunk-concurrency` values `4 8 16`, and cold cache runs. Set `WARM_CACHE=1`, `ITERATIONS`, `OFFSET`, `LENGTH`, `READ_AHEAD_VALUES`, or `CONCURRENCY_VALUES` to tune the run. - -The repository includes `.github/workflows/public-test.yml`, which runs the same public test on pushes and pull requests. The workflow builds the project, reads `installscript.vdf` from the Spacewar depot, mounts the depot through FUSE on Linux, and verifies the file is visible through the mounted filesystem. Manual runs also test WinFsp on Windows. GitHub-hosted macOS runners publish the native macOS binary, install macFUSE, and run the Steam smoke/read check; macFUSE mount validation is available through the `run_macos_self_hosted_mount` manual workflow input on a self-hosted macOS runner with macFUSE configured. - -The workflow also includes an authenticated smoke test for pushes and manual runs. It logs in with configured Steam credentials, resolves the configured depot, and reads a small file from that depot. Configure either: - -- `OP_SERVICE_ACCOUNT_TOKEN` secret plus `OP_STEAM_USERNAME_REF` and `OP_STEAM_PASSWORD_REF` variables for 1Password-backed credentials. -- `STEAM_USERNAME` and `STEAM_PASSWORD` secrets, or `STEAM_ACCESS_TOKEN` secret, for direct credentials. - -Set `STEAM_DEPOTFS_AUTH_APP_ID`, `STEAM_DEPOTFS_AUTH_DEPOT_ID`, and `STEAM_DEPOTFS_AUTH_BRANCH` variables to choose the authenticated test target. `STEAM_DEPOTFS_AUTH_READ_PATH` is optional; when omitted, the smoke command chooses a small readable file from the manifest. +See those scripts for configuration variables. [Depot tests](.github/workflows/public-test.yml) +checks public reads and Linux mounts on pushes and PRs. Manual runs add Windows +mounts and optional self-hosted macOS mounts; hosted macOS checks reads only. +Authenticated tests run on pushes/manual runs when configured. Supply +`STEAM_USERNAME` with `STEAM_PASSWORD` or `STEAM_ACCESS_TOKEN`, or use the workflow's +1Password references. Target-depot variables are documented in the workflow. ## Releases -Releases are created directly from `main` after the `Depot tests` workflow succeeds. The release workflow scans conventional commits since the latest `v*` tag: +Automatic releases follow successful `Depot tests` runs on `main`. Manual release +dispatch also uses `main`, without rerunning those tests. The release workflow +uses [conventional commits](scripts/ci/compute-release-version.sh) since the +previous reachable `v*` tag: - breaking changes create a major release - `feat:` creates a minor release - `fix:`, `perf:`, `refactor:`, and `revert:` create a patch release - docs-only or CI-only changes do not create a release -Each release publishes Windows, Linux, and macOS archives with versioned asset names only, for example `SteamDepotFS-0.2.0-linux-x64.tar.gz`. CI also generates release notes for the GitHub release body, updates the tracked `CHANGELOG.md`, and includes that changelog inside each archive. +The [release workflow](.github/workflows/release.yml) publishes Windows, Linux, +and macOS archives, generates release notes, and regenerates `CHANGELOG.md` from Git history. -## License +Release builds receive their version from CI; each archive includes a `VERSION` +file. Source builds default to version `1.0.0`, so identify them by Git commit. +There is no `--version` command. No version bump in the project file is needed. -SteamDepotFS is licensed under the Apache License, Version 2.0. See `LICENSE` -and `NOTICE`. +## License -Binary distributions may include third-party NuGet packages under their own -licenses, including SteamKit2 under LGPL-2.1-only. See -`THIRD-PARTY-NOTICES.md`. +[Apache-2.0](LICENSE); see [NOTICE](NOTICE). Dependencies retain their own licenses, +including SteamKit2's LGPL-2.1-only; see [THIRD-PARTY-NOTICES.md](THIRD-PARTY-NOTICES.md).