From 39c1bf3f9242f80eac8c11bb1a4c4848b831eb79 Mon Sep 17 00:00:00 2001 From: Huaaudio Date: Mon, 9 Mar 2026 15:33:07 +0100 Subject: [PATCH] update goreleaser check --- .github/workflows/nightly.yml | 12 ++++++------ .goreleaser.yaml | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index cbf364196..18d4a15a3 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -31,11 +31,11 @@ jobs: SHA=$(git rev-parse --short=8 HEAD) BASE_VERSION=$(git describe --tags --match "v*" --exclude "*nightly*" --abbrev=0 2>/dev/null || true) if [ -z "$BASE_VERSION" ] || [ "$BASE_VERSION" = "v0.0.0" ]; then - VERSION="nightly-${DATE}-${SHA}" + TAG="v0.0.0-nightly.${DATE}.${SHA}" else - VERSION="${BASE_VERSION}-nightly-${DATE}-${SHA}" + TAG="${BASE_VERSION}-nightly.${DATE}.${SHA}" fi - TAG="nightly-${DATE}-${SHA}" + VERSION=$TAG git config user.name "github-actions[bot]" git config user.email "github-actions[bot]@users.noreply.github.com" git tag -a "$TAG" -m "Nightly build $VERSION" @@ -154,19 +154,19 @@ jobs: build/* echo "Cleaning up old nightly releases (keeping only the most recent)..." - gh release list --limit 100 --json tagName -q '.[].tagName | select(startswith("nightly-"))' | tail -n +2 | while read -r old_tag; do + gh release list --limit 100 --json tagName -q '.[].tagName | select(contains("-nightly."))' | tail -n +2 | while read -r old_tag; do if [ -n "$old_tag" ] && [ "$old_tag" != "$TAG" ]; then echo "Deleting old nightly release: $old_tag" gh release delete "$old_tag" --cleanup-tag -y || true fi done - echo "Cleaning up old 'nightly-YYYYMMDD-SHA' Docker images on GHCR..." + echo "Cleaning up old 'vX.X.X-nightly...' Docker images on GHCR..." PACKAGE_URL="/users/${{ github.repository_owner }}/packages/container/${{ github.event.repository.name }}/versions" OLD_NIGHTLY_VERSIONS=$(gh api --paginate -H "Accept: application/vnd.github+json" \ -H "X-GitHub-Api-Version: 2022-11-28" \ "$PACKAGE_URL" \ - --jq ". | map(select(any(.metadata.container.tags[]; startswith(\"nightly-\") and (. != \"nightly\") and (. != \"$TAG\")))) | .[].id" 2>/dev/null || true) + --jq ". | map(select(any(.metadata.container.tags[]; contains(\"-nightly.\") and (. != \"nightly\") and (. != \"$TAG\")))) | .[].id" 2>/dev/null || true) for version_id in $OLD_NIGHTLY_VERSIONS; do if [ -n "$version_id" ]; then diff --git a/.goreleaser.yaml b/.goreleaser.yaml index 66436f96d..654ad6ae6 100644 --- a/.goreleaser.yaml +++ b/.goreleaser.yaml @@ -159,7 +159,7 @@ archives: nfpms: - id: picoclaw - builds: + ids: - picoclaw - picoclaw-launcher - picoclaw-launcher-tui