From b5e5fe6b0d1767311082e9177cb4ca672ce80148 Mon Sep 17 00:00:00 2001 From: Ramon Niebla Date: Fri, 17 Apr 2026 11:44:40 -0700 Subject: [PATCH] fix: tolerate missing *.zip in gh release upload The Upload Release Artifacts step in the publish composite action passed ./dist/*.zip to gh release upload. goreleaser isn't configured to produce zip archives (v2.2.0 and earlier shipped Windows builds as .tar.gz), so the literal unmatched glob was passed to gh and it errored with "no matches found for \`./dist/*.zip\`" before any binaries made it onto the draft release. This was the cause of the v3.0.2 release-ldcli failure. Use shopt -s nullglob so unmatched globs expand to nothing, and build the file list as a bash array. The *.zip glob stays in place so that if we later add format_overrides for Windows in .goreleaser.yaml the upload step will pick the zips up without further edits. Made-with: Cursor --- .github/actions/publish/action.yml | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/.github/actions/publish/action.yml b/.github/actions/publish/action.yml index b68689e1..4c159742 100644 --- a/.github/actions/publish/action.yml +++ b/.github/actions/publish/action.yml @@ -102,4 +102,14 @@ runs: env: GITHUB_TOKEN: ${{ inputs.token }} run: | - gh release upload "${{ inputs.tag }}" ./dist/*.tar.gz ./dist/*.zip ./dist/*.txt --clobber + # nullglob lets the *.zip (and any other format we don't currently + # produce) expand to nothing instead of being passed literally to + # gh release upload, which would fail with "no matches found". + set -euo pipefail + shopt -s nullglob + files=(./dist/*.tar.gz ./dist/*.zip ./dist/*.txt) + if [ ${#files[@]} -eq 0 ]; then + echo "No artifacts found in ./dist to upload" >&2 + exit 1 + fi + gh release upload "${{ inputs.tag }}" "${files[@]}" --clobber