From 1dad31636edb89c18e889f5c5c6949563197c9b3 Mon Sep 17 00:00:00 2001 From: Henrik Klee Date: Thu, 19 Nov 2026 04:51:39 +0800 Subject: [PATCH] CI: a release is built on orchard's newest release, not a nightly A tag build took orchard's newest nightly and linked its files, so a release stopped installing once orchard removed that nightly (0.3.0 links nightly-20261117). Without a chosen orchard release, a tag build now uses orchard's latest release. Assisted-by: LLM --- .github/workflows/build.yml | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 1aab06b..16cc564 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -34,9 +34,17 @@ jobs: tag: ${{ steps.resolve.outputs.tag }} steps: - id: resolve + env: + REF_TYPE: ${{ github.ref_type }} + CHOSEN: ${{ inputs.hardware_tag }} run: | tag="$HARDWARE_TAG" - if [[ "$tag" == nightly ]]; then + # A release is built on orchard's newest release, never on a nightly: + # orchard removes nightlies after 14 days, and the release links its files. + if [[ "$REF_TYPE" == tag && -z "$CHOSEN" ]]; then + tag=$(curl -fsSL --retry 3 https://api.github.com/repos/OrchardLinux/orchard/releases/latest | + python3 -c 'import json, sys; print(json.load(sys.stdin)["tag_name"])') + elif [[ "$tag" == nightly ]]; then tag=$(curl -fsSL --retry 3 https://github.com/OrchardLinux/orchard/releases/download/nightly/latest.json | python3 -c 'import json, sys; print(json.load(sys.stdin)["name"])') fi