Skip to content

Commit 8a2f80e

Browse files
authored
Merge branch 'master' into redist-update/client-publicized
2 parents 557b7ca + 85f56b4 commit 8a2f80e

3 files changed

Lines changed: 47 additions & 56 deletions

File tree

.github/workflows/redist-update.yaml

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -301,7 +301,26 @@ jobs:
301301
SOURCE_KEY: ${{ steps.ids.outputs.source_key }}
302302
run: |
303303
set -euo pipefail
304-
names=$(gh api --paginate "repos/$REPO/actions/runs/$RUN_ID/artifacts" --jq '.artifacts[].name' || true)
304+
# Fail LOUD on an API error. The ONLY thing that may mean "this source
305+
# is unchanged" is a SUCCESSFUL artifacts listing that doesn't contain
306+
# our artifact. If the gh call itself fails (transient 5xx / network /
307+
# rate-limit), we must NOT treat that as "unchanged" — that would
308+
# silently skip a genuinely-changed source under a green run, and
309+
# notify-failure (failure()-only) would never fire. Retry, then fail.
310+
ok=false
311+
names=""
312+
for attempt in 1 2 3; do
313+
if names=$(gh api --paginate "repos/$REPO/actions/runs/$RUN_ID/artifacts" --jq '.artifacts[].name'); then
314+
ok=true
315+
break
316+
fi
317+
echo "::warning::Listing run artifacts failed (attempt ${attempt}/3); retrying after backoff..."
318+
sleep $((attempt * 5))
319+
done
320+
if [ "$ok" != "true" ]; then
321+
echo "::error::Could not list this run's artifacts after 3 attempts — cannot determine whether source ${SOURCE_KEY} changed. Failing loudly instead of skipping."
322+
exit 1
323+
fi
305324
if printf '%s\n' "$names" | grep -qx "source-${SOURCE_KEY}"; then
306325
echo "Source ${SOURCE_KEY} changed (artifact present); processing ${{ matrix.variant }}."
307326
echo "changed=true" >> "$GITHUB_OUTPUT"

README.md

Lines changed: 26 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -1,78 +1,50 @@
11
# RocketModFix.Unturned.Redist
22

3-
## Why Use This?
3+
Unturned's managed assemblies (`Assembly-CSharp.dll`, `com.rlabrecque.steamworks.net.dll`, `UnturnedDat.dll`, the SDG/Unity dependencies, and the API XML docs), packaged for NuGet and refreshed automatically each time Unturned ships a new build. Reference a package instead of hand-copying DLLs out of the game's `Managed` folder after every patch.
44

5-
Do you find it annoying to manually copy libraries from the Managed directory every time Unturned updates? With this NuGet package, you get all the necessary Unturned libraries, and they update automatically. You don't need to wait for manual updates — this package acts like a redistributable that stays current.
5+
> **Redistributed with permission.** Nelson Sexton (Smartly Dressed Games) gave explicit written approval to distribute Unturned's libraries — see [issue #8](https://github.com/RocketModFix/RocketModFix.Unturned.Redist/issues/8).
66
7-
> ✅ Officially Approved - This project has explicit written permission from SDG (Smartly Dressed Games) to distribute Unturned libraries. See the [official approval from Nelson Sexton (SDG)](https://github.com/RocketModFix/RocketModFix.Unturned.Redist/issues/8) for legal clarity and peace of mind.
7+
## Install
88

9-
You get:
10-
11-
- **Assembly-CSharp.dll**
12-
- **com.rlabrecque.steamworks.net.dll**
13-
- **UnturnedDat.dll**
14-
- And many more, including XML docs for the Unturned API and related dependencies.
15-
16-
---
17-
18-
## Available Packages and What They Mean
19-
20-
| Package Name | Description |
21-
|-----------------------------------------------|------------------------------------------------|
22-
| **RocketModFix.Unturned.Redist.Client** | Libraries for Unturned client-side tools. |
23-
| **RocketModFix.Unturned.Redist.Server** | Libraries for Unturned server-side tools. |
24-
| **RocketModFix.Unturned.Redist.Client.Publicized** | Publicized client-side libraries with public method/property (members) visibility for modding or advanced reflection. |
25-
| **RocketModFix.Unturned.Redist.Server.Publicized** | Publicized server-side libraries with public method/property (members) visibility. Useful for plugins needing deeper access. |
26-
| **RocketModFix.Unturned.Redist.Client-Preview** | Early access (preview) versions of client-side libraries. |
27-
| **RocketModFix.Unturned.Redist.Server-Preview** | Early access (preview) versions of server-side libraries. |
28-
29-
> **Note:** The main `Client` and `Server` packages now include preview (prerelease) versions inside them for simplicity. The `*-Preview` packages remain available for backward compatibility.
30-
31-
---
32-
33-
## How to Install
9+
```bash
10+
dotnet add package RocketModFix.Unturned.Redist.Server
11+
```
3412

35-
Simply pick the package that matches your needs and add it via NuGet. For example, in your `.csproj` or `packages.config`:
13+
or in your `.csproj`:
3614

3715
```xml
3816
<PackageReference Include="RocketModFix.Unturned.Redist.Server" Version="x.y.z" />
3917
```
4018

41-
Or use the NuGet CLI:
42-
43-
```bash
44-
dotnet add package RocketModFix.Unturned.Redist.Server
45-
```
19+
## Which package do I want?
4620

47-
---
21+
Choose by **side** (client or server). Use a **`.Publicized`** variant when your plugin needs to touch private/internal members — their visibility is rewritten to public.
4822

49-
## Installation Links
23+
| Package | For |
24+
| --- | --- |
25+
| [![Client](https://img.shields.io/nuget/v/RocketModFix.Unturned.Redist.Client?label=Client)](https://www.nuget.org/packages/RocketModFix.Unturned.Redist.Client) | Client-side tools and mods |
26+
| [![Server](https://img.shields.io/nuget/v/RocketModFix.Unturned.Redist.Server?label=Server)](https://www.nuget.org/packages/RocketModFix.Unturned.Redist.Server) | Server-side plugins and tools |
27+
| [![Client.Publicized](https://img.shields.io/nuget/v/RocketModFix.Unturned.Redist.Client.Publicized?label=Client.Publicized)](https://www.nuget.org/packages/RocketModFix.Unturned.Redist.Client.Publicized) | Client mods that need non-public members |
28+
| [![Server.Publicized](https://img.shields.io/nuget/v/RocketModFix.Unturned.Redist.Server.Publicized?label=Server.Publicized)](https://www.nuget.org/packages/RocketModFix.Unturned.Redist.Server.Publicized) | Server plugins that need non-public members |
5029

51-
[![Client](https://img.shields.io/nuget/v/RocketModFix.Unturned.Redist.Client?label=RocketModFix.Unturned.Redist.Client)](https://www.nuget.org/packages/RocketModFix.Unturned.Redist.Client)
52-
[![Server](https://img.shields.io/nuget/v/RocketModFix.Unturned.Redist.Server?label=RocketModFix.Unturned.Redist.Server)](https://www.nuget.org/packages/RocketModFix.Unturned.Redist.Server)
53-
[![Client Preview](https://img.shields.io/nuget/v/RocketModFix.Unturned.Redist.Client-Preview?label=RocketModFix.Unturned.Redist.Client-Preview)](https://www.nuget.org/packages/RocketModFix.Unturned.Redist.Client-Preview)
54-
[![Server Preview](https://img.shields.io/nuget/v/RocketModFix.Unturned.Redist.Server-Preview?label=RocketModFix.Unturned.Redist.Server-Preview)](https://www.nuget.org/packages/RocketModFix.Unturned.Redist.Server-Preview)
55-
[![Client Publicized](https://img.shields.io/nuget/v/RocketModFix.Unturned.Redist.Client.Publicized?label=RocketModFix.Unturned.Redist.Client.Publicized)](https://www.nuget.org/packages/RocketModFix.Unturned.Redist.Client.Publicized)
56-
[![Server Publicized](https://img.shields.io/nuget/v/RocketModFix.Unturned.Redist.Server.Publicized?label=RocketModFix.Unturned.Redist.Server.Publicized)](https://www.nuget.org/packages/RocketModFix.Unturned.Redist.Server.Publicized)
30+
### Stable vs. preview builds
5731

58-
---
32+
`Client` and `Server` carry two streams under the **same package id**:
5933

60-
## Architecture
34+
- **Stable** — Unturned's default branch, versioned `x.y.z.n`.
35+
- **Preview** — Unturned's `preview` branch, published as a prerelease `x.y.z.n-preview<build>`. Enable "include prerelease" in your NuGet client to pull it.
6136

62-
All updates and automation are handled entirely through GitHub Actions.
63-
We don't run any of this on external servers — everything happens directly on GitHub.
37+
The standalone [`…Client-Preview`](https://www.nuget.org/packages/RocketModFix.Unturned.Redist.Client-Preview) and [`…Server-Preview`](https://www.nuget.org/packages/RocketModFix.Unturned.Redist.Server-Preview) packages are **legacy**. They still update for projects that already reference them, but new code should use the prerelease stream above.
6438

65-
📖 **See [ARCHITECTURE.md](ARCHITECTURE.md)** for the full picture: the workflows, the variant matrix (`.github/variants.json`), how the 10 redist directories map to 6 NuGet packages, and how to add a variant.
39+
## How it works
6640

67-
![Architecture](architecture.svg)
41+
Everything runs on GitHub Actions, with no external servers. A scheduled job watches Steam for new Unturned builds; when one lands it downloads the build, repackages the managed DLLs, and opens a pull request. The PR is validated (files present, hashes match, version not a downgrade) and auto-merged, which publishes the affected package to NuGet.
6842

69-
> Diagram source: [`architecture.svg`](architecture.svg) (crisp, version-controlled). `ARCHITECTURE.md` has the details and a Mermaid version.
43+
📖 **[ARCHITECTURE.md](ARCHITECTURE.md)** has the full picture: the workflows, the variant matrix in [`.github/variants.json`](.github/variants.json), how the 4 Steam sources map to 10 directories and 6 packages, and how to add a variant.
7044

71-
---
45+
![Architecture](architecture.svg)
7246

7347
## Credits
7448

75-
Special thanks to these projects that helped us build this auto-updating tool:
76-
77-
- [Unturned-Datamining](https://github.com/Unturned-Datamining)
78-
- [setup-steamcmd](https://github.com/CyberAndrii/setup-steamcmd)
49+
- [Unturned-Datamining](https://github.com/Unturned-Datamining)
50+
- [setup-steamcmd](https://github.com/CyberAndrii/setup-steamcmd)
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
6484140218604384819
1+
763708736677468005

0 commit comments

Comments
 (0)