Skip to content

ci: migrate uploads to official Nexus-Mods/upload-action#2405

Merged
SkrubbySkrubInAShrub merged 12 commits into
community-shaders:devfrom
SkrubbySkrubInAShrub:nexus-api
May 24, 2026
Merged

ci: migrate uploads to official Nexus-Mods/upload-action#2405
SkrubbySkrubInAShrub merged 12 commits into
community-shaders:devfrom
SkrubbySkrubInAShrub:nexus-api

Conversation

@SkrubbySkrubInAShrub
Copy link
Copy Markdown
Collaborator

@SkrubbySkrubInAShrub SkrubbySkrubInAShrub commented May 23, 2026

Summary

  • Replaces alandtse/nexus-workflows (session cookie auth) with the
    official Nexus-Mods/upload-action@v1.0.0-beta.5, eliminating upload
    failures caused by expired session cookies
  • Adds nexusfilegroupid to all 15 auto-upload feature .ini files and
    threads it through feature_version_audit.py into the upload matrix
  • Upload failures now write a diagnostic block to the step summary with
    the mod name, version, file group ID, and artifact name for manual recovery

Notes

  • UNEX_NEXUSMODS_SESSION_COOKIE secret can be deleted from repo settings
  • UNEX_APIKEY is unchanged and now serves dual purpose: version checking
    and upload authentication
  • Feature .ini nexusfilegroupid values are real IDs — verify before
    first live upload

Summary by CodeRabbit

  • Chores
    • Added a configurable Nexus file-group input (with a default) to the release workflow and used it when generating uploads
    • Rewrote upload steps to run inline with stricter file-group validation and improved failure reporting
    • Added/updated Nexus file-group identifiers across many feature configs for clearer grouping
    • Removed obsolete Nexus autoupload flags from several feature configs
    • Updated tooling to read and propagate file-group metadata for uploads

Review Change Stack

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 23, 2026

📝 Walkthrough

Walkthrough

Adds per-feature Nexus file-group IDs, parses them in the audit tool, attaches them to the upload matrix, introduces a nexus_file_group_id workflow input, and replaces the external Nexus upload workflow with inline upload steps that use per-row file_group_id.

Changes

Nexus file group ID support

Layer / File(s) Summary
Workflow input contract
.github/workflows/nexus-upload.yaml
Introduces nexus_file_group_id input in workflow_dispatch and workflow_call, and exposes it to the matrix-generation step environment.
Audit tool parsing & matrix fields
tools/feature_version_audit.py, .github/workflows/nexus-upload.yaml
get_feature_ini_metadata() extracts nexusfilegroupid as file_group_id; build_nexus_upload_matrix() includes file_group_id on matrix rows and the core row may be set from workflow input.
Inline upload-to-nexus implementation
.github/workflows/nexus-upload.yaml
Replaces reusable workflow call with inline steps: download .7z artifact, query Nexus API for existing versions, build upload description from release tag/changelog, validate file_group_id, upload via pinned Nexus-Mods/upload-action, and write structured failure summary on error.
Release workflow secret update
.github/workflows/release-build.yaml
Removes UNEX_NEXUSMODS_SESSION_COOKIE from the nexus-dry-run job's secrets mapping.
Feature INI: add nexusfilegroupid
features/*/Shaders/Features/*.ini
Adds nexusfilegroupid entries to multiple feature INI [Nexus] sections (per-feature numeric IDs or 000000 placeholders).
Feature INI: remove Nexus blocks
features/*/Shaders/Features/*.ini
Removes [Nexus] configuration blocks (commonly autoupload = false) from several feature INI files.

Sequence Diagram(s)

sequenceDiagram
  participant GitHubActions
  participant ArtifactStorage
  participant NexusAPI
  participant NexusModsUploadAction
  GitHubActions->>ArtifactStorage: download prepared .7z artifact
  GitHubActions->>NexusAPI: query existing versions for mod
  GitHubActions->>NexusModsUploadAction: invoke upload (file_group_id, .7z, description, api key)
  NexusModsUploadAction->>NexusAPI: perform file upload
  NexusModsUploadAction-->>GitHubActions: return upload success/failure
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

Possibly related PRs

Suggested reviewers

  • alandtse
  • doodlum
  • jiayev

Poem

🐰 I hopped through INIs, line by line,
Gave each feature its file-group sign.
The audit learned, the matrix grew,
The workflow uploads — neat and true.
🍃🥕

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 50.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and specifically identifies the primary change: migrating the upload mechanism from alandtse/nexus-workflows to the official Nexus-Mods/upload-action. This directly summarizes the main objective of the PR.
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.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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 and usage tips.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 6

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
tools/feature_version_audit.py (1)

961-988: ⚠️ Potential issue | 🔴 Critical | ⚡ Quick win

Core row missing file_group_id field.

According to the review stack context, the core row should include a file_group_id field populated from workflow input, but the current implementation does not set this field. The PR description indicates the core mod should have file_group_id 3119152.

Without this field, the upload action will likely fail or upload to an incorrect file group.

🔧 Proposed fix

Add a core_file_group_id parameter to the function signature:

-def build_nexus_upload_matrix(feature_metadata, core_mod_id, core_filename, core_artifact_pattern, base_ref=None, release_version=None):
+def build_nexus_upload_matrix(feature_metadata, core_mod_id, core_filename, core_artifact_pattern, base_ref=None, release_version=None, core_file_group_id=''):

Add the field to the core row:

     rows = [
         {
             'name': 'core',
             'artifact_pattern': core_artifact_pattern,
             'artifact_name': 'nexus-upload-core',
             'nexus_mod_id': core_mod_id,
             'mod_filename': core_filename,
             'changelog': '',  # filled by workflow from GitHub release body
             'file_description': core_description,
+            'file_group_id': core_file_group_id,
         }
     ]

Add a command-line argument (around line 1191):

parser.add_argument('--core-file-group-id', type=str, default='3119152', help='Core Nexus file group ID for the generated upload matrix')

Pass the argument to the function call (around line 1252):

 matrix = build_nexus_upload_matrix(
     export_features,
     args.core_mod_id,
     args.core_filename,
     args.core_artifact_pattern,
     base_ref=base_ref,
     release_version=args.release_version,
+    core_file_group_id=args.core_file_group_id,
 )
🤖 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 `@tools/feature_version_audit.py` around lines 961 - 988, The core row in
build_nexus_upload_matrix is missing the required 'file_group_id' so add a new
parameter core_file_group_id to build_nexus_upload_matrix and set the core row's
'file_group_id' to that parameter (i.e. add 'file_group_id': core_file_group_id
in the dict for the 'core' row); also add a CLI argument
parser.add_argument('--core-file-group-id', type=str, default='3119152',
help='Core Nexus file group ID for the generated upload matrix') and pass that
parsed value into the build_nexus_upload_matrix call where it's invoked so the
core row is populated from workflow input.
🧹 Nitpick comments (2)
features/Wetness Effects/Shaders/Features/WetnessEffects.ini (1)

6-6: ⚡ Quick win

PR metadata suggestion: add explicit issue linkage in description.

Title already follows Conventional Commits (ci: ...). If this change resolves a tracked upload reliability bug, add a keyword reference like Fixes #<id> (or Addresses #<id>) in the PR description for traceability.

As per coding guidelines, "Issue References ... Suggest adding appropriate GitHub keywords: 'Fixes #123' or 'Closes #123' for bug fixes."

🤖 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 `@features/Wetness` Effects/Shaders/Features/WetnessEffects.ini at line 6, The
PR description is missing an explicit issue linkage; update the PR description
to include a GitHub keyword like "Fixes #<issue-number>" or "Closes
#<issue-number>" if this change (related to nexusfilegroupid = 3176515 in
Features/Wetness Effects/Shaders/Features/WetnessEffects.ini) resolves the
tracked upload reliability bug so the commit (ci: ...) is traceable; ensure the
keyword and correct issue number are added to the PR body.
tools/feature_version_audit.py (1)

1033-1042: ⚡ Quick win

Consider validating file_group_id for auto-upload features.

Features with auto_upload=True require a valid file_group_id for the upload to succeed. Currently, if file_group_id is missing from the INI, the matrix row will have an empty string, which could cause runtime upload failures.

Adding validation would catch configuration errors early and provide a clearer error message.

✅ Proposed validation

Add validation after line 1042:

         row = {
             'name': name,
             'artifact_pattern': artifact_pattern,
             'artifact_name': f'nexus-upload-{sanitize_name(name)}',
             'nexus_mod_id': mod_id,
             'mod_filename': mod_filename,
             'auto_upload': auto_upload,
             'file_description': file_description,
             'file_group_id': ini_metadata.get('file_group_id', ''),
         }
+        # Validate file_group_id is present for auto-upload features
+        if auto_upload and not row['file_group_id']:
+            print(f"Warning: Feature '{name}' has auto_upload=True but missing file_group_id", file=sys.stderr)
+            
         if mod_version:
             row['mod_version'] = mod_version
🤖 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 `@tools/feature_version_audit.py` around lines 1033 - 1042, The row-building
code sets 'file_group_id' to ini_metadata.get('file_group_id', '') but doesn't
validate it for auto-upload; update the logic after the row is created (or
immediately before it's used) to check if auto_upload is True and the
'file_group_id' value is empty/invalid, and if so raise a clear ValueError or
log and skip—refer to the variables/keys 'auto_upload' and 'file_group_id' and
the dict 'row' so you locate the code that constructs the row (and any caller
that performs the upload) and enforce/validate that a non-empty file_group_id
exists before proceeding.
🤖 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/nexus-upload.yaml:
- Around line 467-476: The EXISTING check uses the Python snippet to scan all
files' versions, which can be fooled by archived/optional files; update the
Python filter inside the curl pipeline so it only collects versions from files
belonging to the MAIN category (e.g. change the list comprehension in the
snippet used to build "versions" to include only entries where f.get('category')
== 'MAIN' or f.get('category_name') == 'MAIN' depending on the API key used),
then print true/false as before; keep the overall curl || echo "false" behavior
intact so behavior on API errors is unchanged.
- Around line 505-517: The Upload to Nexus step passes matrix.file_group_id
directly and can fail late with poor context; add a preceding guard step (e.g.,
name "Validate file_group_id") that checks the matrix.file_group_id value and
fails fast if it is empty, null, or a known placeholder like "000000" (use an
exit 1 with a clear message). Place this validation step before the step with id
"upload" so the workflow stops early and provides a helpful error; ensure the
guard uses the same matrix expression (matrix.file_group_id) and does not set
continue-on-error so failures are deterministic.

In `@features/Grass` Collision/Shaders/Features/GrassCollision.ini:
- Line 6: Replace the placeholder nexusfilegroupid value "000000" with the real
Nexus file group ID before enabling autoupload; locate the nexusfilegroupid
entry in Features/Grass Collision/Shaders/Features/GrassCollision.ini and set it
to the actual numeric/hex group ID used by your Nexus account (and verify
autoupload = true is intended), so uploads are categorized correctly and avoid
failures.

In `@features/Sky` Sync/Shaders/Features/SkySync.ini:
- Line 6: Replace the placeholder value for nexusfilegroupid (currently
"000000") with the real file group ID used by the matrix-driven Nexus upload
path; update the nexusfilegroupid setting to the correct ID string in the
SkySync.ini entry, ensure the value uses the exact expected format for Nexus (no
extra whitespace or quotes), and commit the change so the placeholder is not
left in the config.

In `@features/Subsurface` Scattering/Shaders/Features/SubsurfaceScattering.ini:
- Line 6: Replace the placeholder nexusfilegroupid value ("000000") in
SubsurfaceScattering.ini with the actual Nexus file group ID used by your
project's upload workflow; locate the line containing the nexusfilegroupid
setting and update its value to the correct numeric or alphanumeric ID so upload
routing will use the proper group instead of the placeholder.

In `@features/Terrain` Helper/Shaders/Features/TerrainHelper.ini:
- Line 6: The nexusfilegroupid entry currently uses the placeholder value
"000000"; update the nexusfilegroupid setting in Features/Terrain
Helper/Shaders/Features/TerrainHelper.ini (the nexusfilegroupid key) to the
actual Nexus file group ID provided for this project before enabling live
uploads so it no longer contains the placeholder value.

---

Outside diff comments:
In `@tools/feature_version_audit.py`:
- Around line 961-988: The core row in build_nexus_upload_matrix is missing the
required 'file_group_id' so add a new parameter core_file_group_id to
build_nexus_upload_matrix and set the core row's 'file_group_id' to that
parameter (i.e. add 'file_group_id': core_file_group_id in the dict for the
'core' row); also add a CLI argument parser.add_argument('--core-file-group-id',
type=str, default='3119152', help='Core Nexus file group ID for the generated
upload matrix') and pass that parsed value into the build_nexus_upload_matrix
call where it's invoked so the core row is populated from workflow input.

---

Nitpick comments:
In `@features/Wetness` Effects/Shaders/Features/WetnessEffects.ini:
- Line 6: The PR description is missing an explicit issue linkage; update the PR
description to include a GitHub keyword like "Fixes #<issue-number>" or "Closes
#<issue-number>" if this change (related to nexusfilegroupid = 3176515 in
Features/Wetness Effects/Shaders/Features/WetnessEffects.ini) resolves the
tracked upload reliability bug so the commit (ci: ...) is traceable; ensure the
keyword and correct issue number are added to the PR body.

In `@tools/feature_version_audit.py`:
- Around line 1033-1042: The row-building code sets 'file_group_id' to
ini_metadata.get('file_group_id', '') but doesn't validate it for auto-upload;
update the logic after the row is created (or immediately before it's used) to
check if auto_upload is True and the 'file_group_id' value is empty/invalid, and
if so raise a clear ValueError or log and skip—refer to the variables/keys
'auto_upload' and 'file_group_id' and the dict 'row' so you locate the code that
constructs the row (and any caller that performs the upload) and
enforce/validate that a non-empty file_group_id exists before proceeding.
🪄 Autofix (Beta)

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: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 10114282-cd2c-4796-b20a-9fff78b91640

📥 Commits

Reviewing files that changed from the base of the PR and between bb6460d and 6793108.

📒 Files selected for processing (18)
  • .github/workflows/nexus-upload.yaml
  • .github/workflows/release-build.yaml
  • features/Cloud Shadows/Shaders/Features/CloudShadows.ini
  • features/Grass Collision/Shaders/Features/GrassCollision.ini
  • features/Grass Lighting/Shaders/Features/GrassLighting.ini
  • features/HDR Display/Shaders/Features/HDRDisplay.ini
  • features/Hair Specular/Shaders/Features/HairSpecular.ini
  • features/Screen Space GI/Shaders/Features/ScreenSpaceGI.ini
  • features/Screen-Space Shadows/Shaders/Features/ScreenSpaceShadows.ini
  • features/Sky Sync/Shaders/Features/SkySync.ini
  • features/Skylighting/Shaders/Features/Skylighting.ini
  • features/Subsurface Scattering/Shaders/Features/SubsurfaceScattering.ini
  • features/Terrain Blending/Shaders/Features/TerrainBlending.ini
  • features/Terrain Helper/Shaders/Features/TerrainHelper.ini
  • features/Terrain Variation/Shaders/Features/TerrainVariation.ini
  • features/Upscaling/Shaders/Features/Upscaling.ini
  • features/Wetness Effects/Shaders/Features/WetnessEffects.ini
  • tools/feature_version_audit.py
💤 Files with no reviewable changes (1)
  • .github/workflows/release-build.yaml

Comment thread .github/workflows/nexus-upload.yaml
Comment thread .github/workflows/nexus-upload.yaml
Comment thread features/Grass Collision/Shaders/Features/GrassCollision.ini Outdated
Comment thread features/Sky Sync/Shaders/Features/SkySync.ini
Comment thread features/Subsurface Scattering/Shaders/Features/SubsurfaceScattering.ini Outdated
Comment thread features/Terrain Helper/Shaders/Features/TerrainHelper.ini
CORE features are bundled with the main mod and never uploaded
individually to Nexus. The [Nexus] section in their ini files was
unreachable dead config — the matrix builder skips any feature where
IsCore() returns true. Removing it prevents confusion about whether
these features have separate Nexus pages.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@github-actions
Copy link
Copy Markdown

Actionable Suggestions

  • Grass Collision (Skrubby Skrub In A Shrub): Needs version bump to 3-1-0
  • Grass Lighting (Skrubby Skrub In A Shrub): Needs version bump to 2-1-0
  • HDR Display (Skrubby Skrub In A Shrub): Needs version bump to 1-1-0
  • Hair Specular (Skrubby Skrub In A Shrub): Needs version bump to 1-2-0
  • Screen Space GI (Skrubby Skrub In A Shrub): Needs version bump to 4-2-0
  • Screen-Space Shadows (Skrubby Skrub In A Shrub): Needs version bump to 2-2-0
  • Sky Sync (Skrubby Skrub In A Shrub): Needs version bump to 1-2-0
  • Skylighting (Skrubby Skrub In A Shrub): Needs version bump to 1-4-0
  • Subsurface Scattering (Skrubby Skrub In A Shrub): Needs version bump to 3-1-0
  • Terrain Blending (Skrubby Skrub In A Shrub): Needs version bump to 1-2-0
  • Terrain Helper (Skrubby Skrub In A Shrub): Needs version bump to 1-1-0
  • Terrain Variation (Skrubby Skrub In A Shrub): Needs version bump to 1-1-0
  • Wetness Effects (Skrubby Skrub In A Shrub): Needs version bump to 3-2-0

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 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 `@tools/feature_version_audit.py`:
- Around line 1033-1038: The current preflight only warns when
ini_metadata.get('file_group_id') is empty; update the check around the
variables file_group_id and auto_upload (where file_group_id =
ini_metadata.get('file_group_id', '') and if auto_upload ...) to also treat the
known placeholder ID "000000" as missing: trim whitespace from file_group_id and
if auto_upload is true and (file_group_id == '' or file_group_id == '000000')
emit the same stderr warning so placeholder IDs are caught during matrix
generation.
🪄 Autofix (Beta)

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: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 7bd1302a-c10e-479a-ba7f-0a4b9dc2b650

📥 Commits

Reviewing files that changed from the base of the PR and between db96699 and 9ae494d.

📒 Files selected for processing (2)
  • .github/workflows/nexus-upload.yaml
  • tools/feature_version_audit.py

Comment thread tools/feature_version_audit.py Outdated
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

♻️ Duplicate comments (1)
tools/feature_version_audit.py (1)

1034-1038: ⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Update warning message to reflect both missing and placeholder cases.

The validation condition correctly checks for both empty and '000000' placeholder values, but the warning message still says "is not set" which doesn't accurately describe the placeholder case.

📝 Suggested fix
         if auto_upload and (not file_group_id or file_group_id == '000000'):
             print(
-                f"WARNING: {name} has auto_upload=true but nexusfilegroupid is not set in its [Nexus] ini section.",
+                f"WARNING: {name} has auto_upload=true but nexusfilegroupid is missing or a placeholder in its [Nexus] ini section.",
                 file=sys.stderr,
             )
🤖 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 `@tools/feature_version_audit.py` around lines 1034 - 1038, The warning text
for the auto-upload check should reflect both missing and placeholder values:
update the message in the block that checks "if auto_upload and (not
file_group_id or file_group_id == '000000')" so it no longer says "is not set"
but instead indicates "is not set or is the placeholder '000000'" (include the
variable names name and file_group_id in the message for clarity). Keep the same
stderr printing behavior (print(..., file=sys.stderr)) and preserve the
surrounding logic.
🤖 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.

Duplicate comments:
In `@tools/feature_version_audit.py`:
- Around line 1034-1038: The warning text for the auto-upload check should
reflect both missing and placeholder values: update the message in the block
that checks "if auto_upload and (not file_group_id or file_group_id ==
'000000')" so it no longer says "is not set" but instead indicates "is not set
or is the placeholder '000000'" (include the variable names name and
file_group_id in the message for clarity). Keep the same stderr printing
behavior (print(..., file=sys.stderr)) and preserve the surrounding logic.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 531c1c9e-a161-444b-8844-3752c70e6bd8

📥 Commits

Reviewing files that changed from the base of the PR and between 9ae494d and 572daa1.

📒 Files selected for processing (1)
  • tools/feature_version_audit.py

@SkrubbySkrubInAShrub
Copy link
Copy Markdown
Collaborator Author

SkrubbySkrubInAShrub commented May 23, 2026

the feature ini comment is not relevant as this is being generated due to an improper tag of 1.5.2. will resolve itself when 1.6 is released.

@SkrubbySkrubInAShrub SkrubbySkrubInAShrub merged commit 61675d5 into community-shaders:dev May 24, 2026
14 of 15 checks passed
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.

2 participants