Keep secrets.TDLM_PACK_TOKEN (same name as pack.yml); document that it is currently a TDLMPack repo secret while MAVEN_* are org-level. Fall back to github.token so release can proceed after merge without a new HMCL-only secret when the pack token is promoted or unavailable.
72 lines
3.5 KiB
Markdown
72 lines
3.5 KiB
Markdown
# TDLMPack consume path for TDLM/HMCL
|
||
|
||
TDLMPack does **not** pull this launcher via Maven, a version pin, or a pack-build download step.
|
||
The pack build publishes the HMCL Server Modpack client (`server-manifest.json` + `overrides/`)
|
||
under the `tdlm-client/latest` layout. Players install the launcher separately.
|
||
|
||
## After this repo’s publish workflow
|
||
|
||
Run **Actions → Publish TDLM launcher → Run workflow** with a new `release_tag`.
|
||
|
||
### Secrets (sibling pattern)
|
||
|
||
| Name | Where it lives today | Used by |
|
||
|---|---|---|
|
||
| `MAVEN_USER` / `MAVEN_PASSWORD` | **Org** secrets | Stratum / mod Maven publish — **not** used for launcher binaries |
|
||
| `TDLM_PACK_TOKEN` | **TDLMPack repo** secret only (not org) | TDLMPack `pack.yml` Gitea package + release uploads |
|
||
| `github.token` | Actions runtime | HMCL publish fallback when `TDLM_PACK_TOKEN` is unset |
|
||
|
||
HMCL `publish-tdlm.yml` uses the **same name** as TDLMPack: `secrets.TDLM_PACK_TOKEN`, then falls back to `github.token`.
|
||
Org Maven secrets cannot publish Gitea generic packages / releases.
|
||
|
||
**Recommended:** promote `TDLM_PACK_TOKEN` to an **org** secret (like `MAVEN_*`) so HMCL inherits it with no new repo secret. Until then, either copy it onto `TDLM/HMCL` or rely on `github.token` (same-repo release usually works; org `tdlm-hmcl` package write may still need the pack token).
|
||
|
||
### 1. Stable generic URLs (preferred for README / curl / CI)
|
||
|
||
Overwrite-in-place, same host style as the client fileApi:
|
||
|
||
```text
|
||
https://git.nest.potatolab.uk:8443/api/packages/TDLM/generic/tdlm-hmcl/latest/HMCL.exe
|
||
https://git.nest.potatolab.uk:8443/api/packages/TDLM/generic/tdlm-hmcl/latest/HMCL.jar
|
||
```
|
||
|
||
Checksums (when published): `HMCL.exe.sha256`, `HMCL.jar.sha256` next to those names.
|
||
|
||
### 2. Gitea Release (versioned page)
|
||
|
||
```text
|
||
https://git.potatolab.uk/TDLM/HMCL/releases/latest
|
||
```
|
||
|
||
Assets on each tag: `HMCL.exe`, `HMCL.jar`, plus `.sha256` files.
|
||
(Use the nest API host for scripted uploads; public download links on `git.potatolab.uk` are fine for browsers.)
|
||
|
||
### 3. What TDLMPack should change
|
||
|
||
In `TDLM/TDLMPack` README §启动, replace the repo-only “安装 TDLM/HMCL” step with one of the URLs above.
|
||
**Do not** add HMCL as a Gradle/Maven dependency of the pack — pack CI stays pack-only.
|
||
|
||
### 4. Client pack fileApi (CDN)
|
||
|
||
HMCL default (`Metadata.DEFAULT_CLIENT_FILE_API`):
|
||
|
||
```text
|
||
https://packages.dandanton.com/tdlm-client/latest
|
||
```
|
||
|
||
First install / updates fetch `{fileApi}/server-manifest.json` (and `overrides/**` under that root).
|
||
Override at runtime: `-Dhmcl.client.fileApi=…` or jar attribute `hmcl.client.fileApi`.
|
||
|
||
**TDLMPack must use the same URL** so `server-manifest.json` embeds it:
|
||
|
||
```text
|
||
TDLM_CLIENT_FILE_API=https://packages.dandanton.com/tdlm-client/latest
|
||
```
|
||
|
||
Set that as the Gitea Actions **variable** on `TDLM/TDLMPack` (pack.yml already passes `vars.TDLM_CLIENT_FILE_API`).
|
||
|
||
**Publish caveat:** Pack’s current workflow PUTs the client tree to whatever `TDLM_CLIENT_FILE_API` is (upload root = fileApi). Today that defaults to Gitea generic
|
||
`https://git.nest.potatolab.uk:8443/api/packages/TDLM/generic/tdlm-client/latest`.
|
||
If you only change the HMCL default to the CDN and leave Pack publishing to Gitea, players will 404 unless you **mirror/sync** Gitea → `packages.dandanton.com/tdlm-client/latest`.
|
||
If you set `TDLM_CLIENT_FILE_API` to the CDN URL, Pack CI must be able to PUT to that CDN (or you must split “upload origin” from “public fileApi” in Pack — not implemented today). Do not point HMCL at the CDN without one of those two ops paths.
|