fix: pin release sources and verify native platform builds
This commit is contained in:
1 parent
500d72a473
commit
260ad39c03
10 files changed
+99
-70
No files matched your search
@@ -18,7 +18,7 @@ body:
|
||||
paste relevant log output here. you can find logs at:
|
||||
|
||||
- **rmcl logs**: `~/.cache/rmcl/` (per-session files like `rmcl_2026-04-20_12-34-56.log`)
|
||||
- **launch logs**: `~/.local/share/rmcl/instances/{instance}/.minecraft/logs/launches/`
|
||||
- **launch logs**: `~/.local/share/rmcl/instances/{instance}/minecraft/logs/launches/`
|
||||
|
||||
you can also view logs in the TUI via the log overlay or use `rmcl log` from the CLI.
|
||||
render: text
|
||||
|
||||
@@ -230,12 +230,17 @@ jobs:
|
||||
env:
|
||||
PRERELEASE_FLAG: "${{ fromJson(steps.host.outputs.manifest).announcement_is_prerelease && '--prerelease' || '' }}"
|
||||
ANNOUNCEMENT_TITLE: "${{ fromJson(steps.host.outputs.manifest).announcement_title }}"
|
||||
RELEASE_COMMIT: "${{ github.sha }}"
|
||||
CHANGELOG: "${{ steps.changelog.outputs.content }}"
|
||||
RELEASE_TAG: "${{ needs.plan.outputs.tag }}"
|
||||
APP_VERSION: "${{ fromJson(steps.host.outputs.manifest).releases[0].app_version }}"
|
||||
PUBLISH_WINGET: "${{ !fromJson(needs.plan.outputs.val).announcement_is_prerelease || fromJson(needs.plan.outputs.val).publish_prereleases }}"
|
||||
run: |
|
||||
RELEASE_COMMIT="$(git rev-parse HEAD)"
|
||||
echo "$CHANGELOG" > $RUNNER_TEMP/notes.txt
|
||||
WINGET_MANIFEST_NOTE=""
|
||||
if [[ "$PUBLISH_WINGET" == true ]]; then
|
||||
WINGET_MANIFEST_NOTE="The generated WinGet manifest is attached as \`winget-manifest-${APP_VERSION}.zip\` for local validation."
|
||||
fi
|
||||
cat >> $RUNNER_TEMP/notes.txt <<EOF
|
||||
|
||||
## downloads
|
||||
@@ -271,7 +276,7 @@ jobs:
|
||||
winget install Objz.Rmcl
|
||||
\`\`\`
|
||||
|
||||
The generated WinGet manifest is attached as \`winget-manifest-${APP_VERSION}.zip\` for local validation.
|
||||
$WINGET_MANIFEST_NOTE
|
||||
|
||||
### AUR
|
||||
|
||||
@@ -374,24 +379,3 @@ jobs:
|
||||
secrets: inherit
|
||||
permissions:
|
||||
"contents": "write"
|
||||
|
||||
announce:
|
||||
needs:
|
||||
- plan
|
||||
- host
|
||||
- publish-homebrew-formula
|
||||
- custom-publish-crates
|
||||
- custom-publish-aur
|
||||
- custom-publish-winget
|
||||
# use "always() && ..." to allow us to wait for all publish jobs while
|
||||
# still allowing individual publish jobs to skip themselves (for prereleases).
|
||||
# "host" however must run to completion, no skipping allowed!
|
||||
if: ${{ always() && needs.host.result == 'success' && (needs.publish-homebrew-formula.result == 'skipped' || needs.publish-homebrew-formula.result == 'success') && (needs.custom-publish-crates.result == 'skipped' || needs.custom-publish-crates.result == 'success') && (needs.custom-publish-aur.result == 'skipped' || needs.custom-publish-aur.result == 'success') && (needs.custom-publish-winget.result == 'skipped' || needs.custom-publish-winget.result == 'success') }}
|
||||
runs-on: "ubuntu-22.04"
|
||||
env:
|
||||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
with:
|
||||
persist-credentials: false
|
||||
submodules: recursive
|
||||
@@ -32,22 +32,6 @@ jobs:
|
||||
components: rustfmt
|
||||
- run: cargo fmt --all -- --check
|
||||
|
||||
clippy:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
with:
|
||||
ref: ${{ inputs.ref || github.sha }}
|
||||
- uses: dtolnay/rust-toolchain@stable
|
||||
with:
|
||||
components: clippy
|
||||
- uses: actions/setup-java@v5
|
||||
with:
|
||||
distribution: temurin
|
||||
java-version: "21"
|
||||
- uses: Swatinem/rust-cache@v2
|
||||
- run: cargo clippy --all-targets --locked -- -D warnings
|
||||
|
||||
build-and-test:
|
||||
name: build and test (${{ matrix.os }})
|
||||
runs-on: ${{ matrix.os }}
|
||||
@@ -61,6 +45,8 @@ jobs:
|
||||
with:
|
||||
ref: ${{ inputs.ref || github.sha }}
|
||||
- uses: dtolnay/rust-toolchain@stable
|
||||
with:
|
||||
components: clippy
|
||||
- uses: actions/setup-java@v5
|
||||
with:
|
||||
distribution: temurin
|
||||
@@ -72,6 +58,7 @@ jobs:
|
||||
if: runner.os == 'Linux'
|
||||
run: sudo apt-get update && sudo apt-get install --yes libxcb1-dev
|
||||
- run: cargo build --locked
|
||||
- run: cargo clippy --all-targets --locked -- -D warnings
|
||||
- run: cargo test --locked --all-targets
|
||||
|
||||
network-tests:
|
||||
|
||||
@@ -11,16 +11,27 @@ concurrency:
|
||||
cancel-in-progress: false
|
||||
|
||||
jobs:
|
||||
resolve:
|
||||
runs-on: ubuntu-latest
|
||||
outputs:
|
||||
sha: ${{ steps.checkout.outputs.commit }}
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
id: checkout
|
||||
with:
|
||||
ref: master
|
||||
|
||||
checks:
|
||||
needs: resolve
|
||||
uses: ./.github/workflows/checks.yml
|
||||
with:
|
||||
network-tests: true
|
||||
ref: master
|
||||
ref: ${{ needs.resolve.outputs.sha }}
|
||||
secrets:
|
||||
curseforge-api-key: ${{ secrets.CURSEFORGE_API_KEY }}
|
||||
|
||||
prepare:
|
||||
needs: checks
|
||||
needs: [resolve, checks]
|
||||
runs-on: ubuntu-latest
|
||||
outputs:
|
||||
release: ${{ steps.version.outputs.release }}
|
||||
@@ -28,7 +39,7 @@ jobs:
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
with:
|
||||
ref: master
|
||||
ref: ${{ needs.resolve.outputs.sha }}
|
||||
fetch-depth: 0
|
||||
fetch-tags: true
|
||||
|
||||
@@ -39,23 +50,8 @@ jobs:
|
||||
set -euo pipefail
|
||||
|
||||
version=$(cargo metadata --no-deps --format-version 1 | jq -r '.packages[] | select(.name == "rmcl") | .version')
|
||||
mapfile -t versions < <(git tag --list 'v*' --sort=-v:refname | sed -nE 's/^v([0-9]+\.[0-9]+\.[0-9]+([-+][0-9A-Za-z.-]+)?)$/\1/p')
|
||||
latest=${versions[0]:-}
|
||||
tag="v${version}"
|
||||
release=false
|
||||
|
||||
if [[ -z "$latest" ]] || [[ "$version" != "$latest" && "$(printf '%s\n%s\n' "$latest" "$version" | sort -V | tail -n1)" == "$version" ]]; then
|
||||
release=true
|
||||
fi
|
||||
|
||||
echo "release=$release" >> "$GITHUB_OUTPUT"
|
||||
echo "tag=$tag" >> "$GITHUB_OUTPUT"
|
||||
|
||||
if [[ "$release" == true ]]; then
|
||||
echo "releasing $tag (latest release: ${latest:-none})"
|
||||
else
|
||||
echo "Cargo.toml version $version is not newer than latest release v$latest; nothing to release"
|
||||
fi
|
||||
python3 scripts/release-version.py --check
|
||||
python3 scripts/release-version.py "$version"
|
||||
|
||||
- name: create tag
|
||||
if: steps.version.outputs.release == 'true'
|
||||
|
||||
@@ -68,6 +68,13 @@ prebuilt archives are attached to each GitHub release.
|
||||
brew install objz/tap/rmcl
|
||||
```
|
||||
|
||||
Linux archives and Homebrew installations require the system `libxcb` runtime
|
||||
package (`libxcb1` on Debian/Ubuntu, `libxcb` on Arch).
|
||||
|
||||
An ARM64 launcher build still needs Minecraft natives for that platform. For
|
||||
example, Minecraft 1.20.1 supplies macOS ARM64 natives but no Linux ARM64 natives;
|
||||
using a custom GLFW library alone does not provide the other required libraries.
|
||||
|
||||
### Windows
|
||||
|
||||
release builds include a `.zip` archive and an `.msi`. WinGet packages are
|
||||
@@ -106,6 +113,7 @@ cargo install rmcl
|
||||
### from source
|
||||
|
||||
requires a Rust toolchain and a JDK (`javac` and `jar` on `PATH`).
|
||||
Linux builds also require the libxcb development package (`libxcb1-dev` on Debian/Ubuntu, `libxcb` on Arch).
|
||||
|
||||
```sh
|
||||
git clone https://github.com/objz/rmcl.git
|
||||
@@ -124,10 +132,10 @@ settings, accounts, instances, and cached game metadata.
|
||||
| what | Linux | macOS | Windows |
|
||||
|---|---|---|---|
|
||||
| config (`config.toml`, `theme.toml`, `accounts.json`) | `~/.config/rmcl/` | `~/Library/Application Support/rmcl/` | `%APPDATA%\rmcl\` |
|
||||
| instances | `~/.local/share/rmcl/instances/` | `~/Library/Application Support/rmcl/instances/` | `%LOCALAPPDATA%\rmcl\instances\` |
|
||||
| metadata (versions, libraries, assets, loader profiles) | `~/.local/share/rmcl/meta/` | `~/Library/Application Support/rmcl/meta/` | `%LOCALAPPDATA%\rmcl\meta\` |
|
||||
| instances | `~/.local/share/rmcl/instances/` | `~/Library/Application Support/rmcl/instances/` | `%APPDATA%\rmcl\instances\` |
|
||||
| metadata (versions, libraries, assets, loader profiles) | `~/.local/share/rmcl/meta/` | `~/Library/Application Support/rmcl/meta/` | `%APPDATA%\rmcl\meta\` |
|
||||
|
||||
each instance has an `instance.json` for its config and a `.minecraft/` directory with the actual game files.
|
||||
each instance has an `instance.json` for its config and a `minecraft/` directory with the actual game files.
|
||||
|
||||
Launcher settings can be edited from the TUI or in `config.toml`. Changes to
|
||||
`instances_dir`, `meta_dir`, and `image_protocol` apply after restarting rmcl;
|
||||
@@ -169,7 +177,7 @@ launcher logs are per-session and contain rmcl's own output. instance launch log
|
||||
| what | Linux | macOS | Windows |
|
||||
|---|---|---|---|
|
||||
| launcher logs | `~/.cache/rmcl/` | `~/Library/Caches/rmcl/` | `%LOCALAPPDATA%\rmcl\` |
|
||||
| instance launch logs | `<instances>/<name>/.minecraft/logs/launches/` | same | same |
|
||||
| instance launch logs | `<instances>/<name>/minecraft/logs/launches/` | same | same |
|
||||
|
||||
---
|
||||
|
||||
|
||||
+1
-1
@@ -9,7 +9,7 @@ tap = "objz/homebrew-tap"
|
||||
targets = ["aarch64-apple-darwin", "aarch64-unknown-linux-gnu", "x86_64-apple-darwin", "x86_64-unknown-linux-gnu", "x86_64-pc-windows-msvc"]
|
||||
install-path = "CARGO_HOME"
|
||||
publish-jobs = ["homebrew", "./publish-crates", "./publish-aur", "./publish-winget"]
|
||||
github-custom-job-permissions = { publish-crates = { contents = "read" }, publish-aur = { contents = "read" }, publish-winget = { contents = "read" } }
|
||||
github-custom-job-permissions = { publish-crates = { contents = "read" }, publish-aur = { contents = "read" }, publish-winget = { contents = "write" } }
|
||||
github-build-setup = "../dist-build-setup.yml"
|
||||
hosting = "github"
|
||||
install-updater = false
|
||||
|
||||
@@ -6,7 +6,7 @@ pkgdesc="Minecraft launcher TUI"
|
||||
arch=('x86_64' 'aarch64')
|
||||
url="https://github.com/objz/rmcl"
|
||||
license=('GPL-3.0-only')
|
||||
depends=()
|
||||
depends=('libxcb')
|
||||
provides=('rmcl')
|
||||
conflicts=('rmcl' 'rmcl-git' 'mcl-launcher' 'mcl-launcher-bin' 'mcl-launcher-git')
|
||||
replaces=('mcl-launcher' 'mcl-launcher-bin' 'mcl-launcher-git')
|
||||
|
||||
@@ -6,7 +6,7 @@ pkgdesc="Minecraft launcher TUI"
|
||||
arch=('x86_64' 'aarch64')
|
||||
url="https://github.com/objz/rmcl"
|
||||
license=('GPL-3.0-only')
|
||||
depends=()
|
||||
depends=('libxcb')
|
||||
makedepends=('git' 'rust' 'cargo' 'jdk-openjdk')
|
||||
provides=('rmcl')
|
||||
conflicts=('rmcl' 'rmcl-bin' 'mcl-launcher' 'mcl-launcher-bin' 'mcl-launcher-git')
|
||||
@@ -36,7 +36,7 @@ check() {
|
||||
|
||||
package() {
|
||||
cd "$srcdir/rmcl"
|
||||
install -Dm755 "target/release/rmcl" "$pkgdir/usr/bin/rmcl"
|
||||
install -Dm755 "$srcdir/target/release/rmcl" "$pkgdir/usr/bin/rmcl"
|
||||
install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
|
||||
install -Dm644 README.md "$pkgdir/usr/share/doc/$pkgname/README.md"
|
||||
}
|
||||
+2
-2
@@ -6,7 +6,7 @@ pkgdesc="Minecraft launcher TUI"
|
||||
arch=('x86_64' 'aarch64')
|
||||
url="https://github.com/objz/rmcl"
|
||||
license=('GPL-3.0-only')
|
||||
depends=()
|
||||
depends=('libxcb')
|
||||
makedepends=('rust' 'cargo' 'jdk-openjdk')
|
||||
provides=('rmcl')
|
||||
conflicts=('rmcl-bin' 'rmcl-git' 'mcl-launcher' 'mcl-launcher-bin' 'mcl-launcher-git')
|
||||
@@ -31,7 +31,7 @@ check() {
|
||||
|
||||
package() {
|
||||
cd "$srcdir/rmcl-${pkgver}"
|
||||
install -Dm755 "target/release/rmcl" "$pkgdir/usr/bin/rmcl"
|
||||
install -Dm755 "$srcdir/target/release/rmcl" "$pkgdir/usr/bin/rmcl"
|
||||
install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
|
||||
install -Dm644 README.md "$pkgdir/usr/share/doc/$pkgname/README.md"
|
||||
}
|
||||
@@ -0,0 +1,54 @@
|
||||
# SPDX-FileCopyrightText: 2026 Constantin Bauer
|
||||
# SPDX-License-Identifier: GPL-3.0-only
|
||||
|
||||
import os
|
||||
import re
|
||||
import subprocess
|
||||
import sys
|
||||
|
||||
|
||||
def version_key(value):
|
||||
match = re.fullmatch(
|
||||
r"(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)"
|
||||
r"(?:-([0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*))?"
|
||||
r"(?:\+[0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*)?",
|
||||
value,
|
||||
)
|
||||
if match is None:
|
||||
return None
|
||||
pre = match[4].split(".") if match[4] is not None else []
|
||||
if any(part.isdigit() and len(part) > 1 and part.startswith("0") for part in pre):
|
||||
return None
|
||||
return tuple(map(int, match.groups()[:3])) + (
|
||||
match[4] is None,
|
||||
tuple((0, int(part)) if part.isdigit() else (1, part) for part in pre),
|
||||
)
|
||||
|
||||
|
||||
def check():
|
||||
chain = "1.0.0-alpha 1.0.0-alpha.1 1.0.0-alpha.beta 1.0.0-beta 1.0.0-beta.2 1.0.0-beta.11 1.0.0-rc.1 1.0.0".split()
|
||||
assert all(version_key(a) < version_key(b) for a, b in zip(chain, chain[1:]))
|
||||
assert version_key("1.0.0+build2") == version_key("1.0.0+build1")
|
||||
assert all(version_key(v) is None for v in ["01.0.0", "1.0.0-01", "1.0.0-alpha..1"])
|
||||
assert version_key("0.5.1") > version_key("0.5.1-rc.1")
|
||||
assert version_key("0.5.1-rc.10") > version_key("0.5.1-rc.9")
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
if sys.argv[1:] == ["--check"]:
|
||||
check()
|
||||
else:
|
||||
version = sys.argv[1]
|
||||
candidate = version_key(version)
|
||||
if candidate is None:
|
||||
sys.exit(f"Invalid package version: {version}")
|
||||
versions = [
|
||||
(key, tag[1:])
|
||||
for tag in subprocess.check_output(["git", "tag", "--list", "v*"], text=True).splitlines()
|
||||
if (key := version_key(tag[1:])) is not None
|
||||
]
|
||||
latest_key, latest = max(versions, default=(None, ""))
|
||||
release = latest_key is None or candidate > latest_key
|
||||
with open(os.environ["GITHUB_OUTPUT"], "a", encoding="utf-8") as output:
|
||||
output.write(f"release={str(release).lower()}\ntag=v{version}\n")
|
||||
print(f"v{version}: release={str(release).lower()}, latest={latest or 'none'}")
|
||||
Reference in new issue
Block a user