Visitar URL original
fix(release): narrow release asset glob to finished packages by Deko-sudo · Pull Request #9 · Deko-sudo/Racoon-Typper · GitHub
Skip to content

fix(release): narrow release asset glob to finished packages - #9

Merged
Deko-sudo merged 1 commit into
mainfrom
fix/release-narrow-glob
Aug 9, 2026
Merged

Deko-sudo merged 1 commit into
mainfrom
fix/release-narrow-glob

Conversation

@Deko-sudo

@Deko-sudo Deko-sudo commented Aug 9, 2026 •

Copy link
Copy Markdown
Owner

The 'Create draft release candidate' step uses files: artifacts/**/, which also uploads the unpacked contents of the .deb/.rpm/.AppImage bundles stored in the artifact (gschemas, im-.so, lib*.so, control, data.tar.gz, debian-binary, etc). Many filenames repeat across the deb/rpm/appimage trees, so softprops/action-gh-release tries to update an already-uploaded asset via update-a-release-asset and fails with Not Found, aborting the job on every run.

Narrow the glob to the finished distributables (.deb/.rpm/.AppImage/.tar.gz/.torrent/.exe), the generated SHA256SUMS, and the release-evidence files (sbom, provenance, manifest).

Summary by CodeRabbit

  • Bug Fixes
    • Release candidate drafts now include only the intended artifact files, checksum data, and release evidence.
    • Unrelated files are no longer included in draft release uploads.

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

The 'Create draft release candidate' step used files: artifacts/**/*,
which also picked up the unpacked contents of the .deb/.rpm/.AppImage
bundles stored in the artifact (gschemas, im-*.so, lib*.so, control,
data.tar.gz, etc). Many of those filenames repeat across the deb/rpm/
appimage trees, so softprops/action-gh-release tried to update an
already-uploaded asset via update-a-release-asset and failed with
Not Found, aborting the job every run.

Restrict the glob to the finished distributables (.deb/.rpm/.AppImage/
.tar.gz/.torrent/.exe), the generated SHA256SUMS, and the release
evidence produced by the SBOM step.
@coderabbitai

coderabbitai Bot commented Aug 9, 2026 •

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

The release candidate workflow now uploads only explicitly listed Debian, RPM, AppImage, tarball, torrent, Windows installer, checksum, and release-evidence files.

Changes

Release artifact selection

Layer / File(s) Summary
Explicit release upload patterns
.github/workflows/release-candidate.yml
The workflow replaces artifacts/**/* with explicit patterns for supported release artifacts, SHA256SUMS, and release-evidence files.

Estimated code review effort: 1 (Trivial) | ~5 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly describes the main change: limiting the release asset glob to finished packages.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/release-narrow-glob

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@Deko-sudo
Deko-sudo merged commit 48daa6c into main Aug 9, 2026
3 of 4 checks passed
@Deko-sudo
Deko-sudo deleted the fix/release-narrow-glob branch August 9, 2026 22:53

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In @.github/workflows/release-candidate.yml:
- Around line 229-236: Set fail_on_unmatched_files: true in the
softprops/action-gh-release configuration containing the artifact file list, so
missing release assets or evidence files cause the release step to fail instead
of only warning.
- Around line 235-236: Update the release asset preparation and upload steps in
the workflow to stage exactly the configured files patterns, reject duplicate
basenames, generate SHA256SUMS from the staging directory while excluding the
checksum file itself, and upload that same staged set so checksum paths match
downloaded asset names.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 8cdbc39e-d11e-4389-9b38-a165c6354dea

📥 Commits

Reviewing files that changed from the base of the PR and between 0f5ea33 and 6adec40.

📒 Files selected for processing (1)
  • .github/workflows/release-candidate.yml

Comment on lines +229 to +236
artifacts/**/*.deb
artifacts/**/*.rpm
artifacts/**/*.AppImage
artifacts/**/*.tar.gz
artifacts/**/*.torrent
artifacts/**/*.exe
artifacts/SHA256SUMS
artifacts/release-evidence/*

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/usr/bin/env bash
set -euo pipefail

rg -n -A25 'softprops/action-gh-release@' .github/workflows/release-candidate.yml \
  | rg -q 'fail_on_unmatched_files:\s*true'

Repository: Deko-sudo/Racoon-Typper

Length of output: 161


🏁 Script executed:

#!/usr/bin/env bash
set -euo pipefail

echo "== release-candidate release action block =="
rg -n -A80 -B40 'softprops/action-gh-release@' .github/workflows/release-candidate.yml || true

echo
echo "== fail_on_unmatched_files references =="
rg -n 'fail_on_unmatched_files|unmatched_files|upload-release-assets|actions/gh-release|release.*assets' .github/workflows || true

echo
echo "== pinned action.yml input definition (if internet available) =="
curl -sL "https://raw.githubusercontent.com/softprops/action-gh-release/c95fe1489396fe8a9eb87c0abf8aa5b2ef267fda/action.yml" \
  | sed -n '1,220p' | rg -n 'fail_on_unmatched_files|inputs:|files:' -A8 -B2 || true

Repository: Deko-sudo/Racoon-Typper

Length of output: 4600


Enable release-asset glob-failure checks.

softprops/action-gh-release only emits an unmatched-glob warning unless fail_on_unmatched_files is set. Set fail_on_unmatched_files: true on this block so missing .deb, .rpm, .AppImage, tar.gz, .torrent, .exe, SHA256SUMS, or release evidence files prevents an incomplete release draft.

Proposed fix
         with:
+          fail_on_unmatched_files: true
           tag_name: ${{ needs.validate-tag.outputs.tag }}
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/release-candidate.yml around lines 229 - 236, Set
fail_on_unmatched_files: true in the softprops/action-gh-release configuration
containing the artifact file list, so missing release assets or evidence files
cause the release step to fail instead of only warning.

Source: MCP tools

Comment on lines +235 to +236
artifacts/SHA256SUMS
artifacts/release-evidence/*

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🗄️ Data Integrity & Integration | 🟠 Major | 🏗️ Heavy lift

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "== workflow files =="
git ls-files '.github/workflows/*' | sed -n '1,120p'

echo
echo "== release-candidate workflow excerpt =="
if [ -f .github/workflows/release-candidate.yml ]; then
  sed -n '1,280p' .github/workflows/release-candidate.yml | cat -n
fi

echo
echo "== search for SHA256SUMS and artifacts =="
rg -n "SHA256SUMS|artifacts/|download-artifact|upload-artifact|sha256sum|release.*asset|action/release" .github/workflows/release-candidate.yml .github/workflows 2>/dev/null || true

Repository: Deko-sudo/Racoon-Typper

Length of output: 17265


🌐 Web query:

softprops action-gh-release files globs basename upload behavior

💡 Result:

The softprops/action-gh-release action uses the files input to determine which assets to upload to a GitHub release. This input accepts a newline-delimited list of glob patterns [1][2][3]. Key behaviors regarding file selection and uploading include: Glob Handling: The action uses glob matching to resolve file paths [2][4]. Because of this, any literal filenames containing glob metacharacters (such as [ or ]) must be escaped in the pattern to be matched correctly [1][2]. Working Directory: The action provides an optional working_directory input, which serves as the base directory for resolving the files glob patterns [1][2][5]. If this is omitted, the action defaults to resolving paths from the runner's workspace root (${{ github.workspace }}) [1][2][3]. Basename and Naming: The action uploads files as-is based on the matches found. However, GitHub itself controls the final storage and presentation of asset filenames [2][4]. GitHub may normalize or rewrite filenames that contain special or non-ASCII characters; while the action attempts to restore the asset label, it cannot guarantee the final download name, especially for complex characters like 4-byte Unicode (emojis) [2][4]. The action does not control the final ordering of assets as displayed on the GitHub release page [2][6]. Additional Notes: - On Windows, both forward slashes (/) and backslashes () are accepted as path separators [1][2]. - You can toggle whether the action should fail if a glob pattern finds no matching files using the fail_on_unmatched_files input (defaults to false) [1][3][7]. - Existing files can be overwritten by default (overwrite_files: true) if a release with the same tag name already exists [1].

Citations:


🌐 Web query:

actions download-artifact v4 path named artifacts merge flatten

💡 Result:

In GitHub Actions, the actions/download-artifact@v4 action does not use an input named "flatten" or "merge". Instead, it uses the input merge-multiple to control whether downloaded artifacts are placed into a single directory [1][2]. Here is how you can use it: - merge-multiple: When set to 'true', multiple artifacts matched by a pattern (or all artifacts if no name/pattern is specified) are downloaded into the same directory specified by the path input [1][3]. - Default behavior: When merge-multiple is 'false' (the default), each artifact is extracted into its own individual subdirectory within the specified path [1][2]. Example configuration to merge multiple artifacts into one directory: - uses: actions/download-artifact@v4 with: path: my-destination-directory merge-multiple: true Note: 1. If files within different artifacts share the same name while merge-multiple: true is enabled, the "last writer wins" (the last file processed will overwrite any existing file with the same name) [4]. 2. When downloading a single specific artifact (by name or ID), it is always extracted directly to the specified path, regardless of the merge-multiple setting [3][2].

Citations:


🌐 Web query:

actions/download-artifact v4 single named artifact basename file output

💡 Result:

When using actions/download-artifact@v4 to download a single named artifact, the files are extracted directly into the specified destination path without creating a subdirectory named after the artifact [1][2]. Key details regarding this behavior: 1. Single Artifact Download: By providing the name input, the action targets exactly one artifact. It downloads the contents of that artifact directly to the path defined in your workflow (or the default $GITHUB_WORKSPACE if no path is provided) [1][3][2]. 2. Distinction from Multiple/All Artifacts: If you do not specify a name, the action attempts to download all artifacts from the workflow run. By default (with merge-multiple: false), downloading all artifacts creates individual subdirectories for each artifact within your destination path [1][3][4]. 3. Consistency: This direct extraction behavior for single artifacts is consistent across v4 versions [3][4][2]. If you find that your files are being placed in unexpected locations when downloading, ensure you are providing the correct name input. If you need to enforce a specific directory structure for a single artifact, you should explicitly include that directory in the path input (e.g., path: my-artifact-dir/) [4][5].

Citations:


🌐 Web query:

softprops/action-gh-release action.yml files input implementation release assets basename

💡 Result:

In the softprops/action-gh-release action, the release asset filenames are determined using the path basename [1][2]. The action accepts a files input, which takes a newline-delimited list of glob patterns to identify assets for upload [3][4][5]. When processing these files, the action's implementation utilizes the Node.js path module's basename function (imported as basename(path)) to extract the filename from the provided path [1][2]. This extracted basename is subsequently used as the name for the uploaded release asset [1][2]. While the action attempts to use this basename as the asset label, it notes that GitHub may normalize raw asset filenames containing special characters [3][4][6]. Although the action attempts to restore the asset label where possible, the final download name of the asset remains under GitHub's control [3][7][5].

Citations:


🏁 Script executed:

#!/bin/bash
set -euo pipefail

python3 - <<'PY'
import pathlib, os

roots = [
    "target/release/bundle/deb/racoon-typper_1.2.3_amd64/deb/build/racoon-typper_1.2.3_amd64.deb",
    "racoon-typper-v1.2.3-x86_64.tar.gz",
    "target/release/bundle/nsis/racoon-typper-setup.exe",
    "artifacts/release-evidence/racoon-typper.sbom.cdx.json",
]

patterns = [
    "artifacts/**/*.deb",
    "artifacts/**/*.rpm",
    "artifacts/**/*.AppImage",
    "artifacts/**/*.tar.gz",
    "artifacts/**/*.torrent",
    "artifacts/**/*.exe",
    "artifacts/SHA256SUMS",
    "artifacts/release-evidence/*",
]
entries = [pathlib.Path("artifacts") / p.replace("target/", "") for p in roots]

def matches(p):
    p = pathlib.Path(p)
    return any(p.match(pat) or pathlib.Path(*p.parts[1:]).match(pat) for pat in patterns)

for entry in entries:
    print(f"path={entry.relative_to('artifacts')} sha_entry=./{entry} sha_hash={} release_asset={entry.name} matched={matches(entry)}")

print("sha256sum verify behavior against downloaded basename:")
print("If download-artifact v4 extracts single artifacts directly under artifacts, verify uses: sha256sum -c SHA256SUMS; sha256sums may list files under artifacts/racoon-typper-linux/racoon-typper-*.deb while user downloads artifacts/racoon-typper.deb")
PY

Repository: Deko-sudo/Racoon-Typper

Length of output: 511


🏁 Script executed:

#!/bin/bash
set -euo pipefail

python3 - <<'PY'
import pathlib

roots = [
    "racoon-typper-linux/target/release/bundle/deb/racoon-typper_1.2.3_amd64/deb/build/racoon-typper_1.2.3_amd64.deb",
    "racoon-typper-linux/racoon-typper-v1.2.3-x86_64.tar.gz",
    "racoon-typper-windows/target/release/bundle/nsis/racoon-typper-setup.exe",
    "racoon-typper-windows/release-evidence/racoon-typper.sbom.cdx.json",
]

patterns = [
    "artifacts/**/*.deb",
    "artifacts/**/*.rpm",
    "artifacts/**/*.AppImage",
    "artifacts/**/*.tar.gz",
    "artifacts/**/*.torrent",
    "artifacts/**/*.exe",
    "artifacts/SHA256SUMS",
    "artifacts/release-evidence/*",
]
entries = [pathlib.Path("artifacts") / p for p in roots]

def matches(p):
    return any(p.match(pat) or pathlib.Path(*p.parts[1:]).match(pat) for pat in patterns)

print("release-candidate SHA256SUMS vs release asset names:")
for entry in entries:
    print(f"path={entry.relative_to('artifacts')} sha_entry=./{entry} release_asset={entry.name} matched={matches(entry)}")

print("\nsha256sum behavior:")
print("Users download basename assets from GitHub releases, then run sha256sum -c SHA256SUMS. Entries with leading directory paths do not match files in the current build directory, so verification can fail for the released basename asset.")
PY

Repository: Deko-sudo/Racoon-Typper

Length of output: 1418


Stage and checksum only the release assets before upload.

SHA256SUMS includes every artifacts file, so it lists ./artifacts/racoon-typper-linux/.../file.deb while softprops/action-gh-release uploads file.deb. Users’ sha256sum -c SHA256SUMS can fail for downloaded release assets. Stage the exact files patterns used here, reject duplicate basenames, generate SHA256SUMS from that staging directory excluding SHA256SUMS, and upload the same staged set.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/release-candidate.yml around lines 235 - 236, Update the
release asset preparation and upload steps in the workflow to stage exactly the
configured files patterns, reject duplicate basenames, generate SHA256SUMS from
the staging directory while excluding the checksum file itself, and upload that
same staged set so checksum paths match downloaded asset names.

Source: MCP tools

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant