Skip to content

Commit b1e5691

Browse files
committed
🔄 synced local '.github/workflows/update-module-properties.yml' with remote '.releases/update-module-properties.yml'
1 parent cd80628 commit b1e5691

File tree

1 file changed

+37
-0
lines changed

1 file changed

+37
-0
lines changed

‎.github/workflows/update-module-properties.yml‎

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,7 @@ jobs:
9999
# - composer: uses .phar files
100100
# - xlight: version in release name
101101
# - git: files start with "portable"
102+
# - nodejs: files start with "node-" instead of "nodejs"
102103
# - ghostscript: version embedded without dots (e.g., gs10051w64.7z for version 10.05.1)
103104
assets = []
104105
for asset in release_data.get('assets', []):
@@ -107,6 +108,7 @@ jobs:
107108
# For composer, accept any .phar file (doesn't need to start with "composer")
108109
# For xlight, accept xlight-x64.zip (version comes from release name)
109110
# For git, files start with "portable" instead of "git"
111+
# For nodejs, files start with "node-" instead of "nodejs"
110112
# For other modules, file must start with module name
111113
if module_name == 'composer':
112114
if filename.endswith('.phar'):
@@ -175,6 +177,37 @@ jobs:
175177
print(f"ERROR: Could not extract version for git from release name or filename: {filename}")
176178
print(f"Release name: {release_data.get('name', 'N/A')}")
177179
exit(1)
180+
elif module_name == 'nodejs':
181+
# For nodejs, files start with "node-" instead of "nodejs"
182+
# Accept files with .7z, .exe, .zip extensions
183+
if filename.lower().startswith('node-'):
184+
# Check if file has valid extension
185+
valid_ext = (filename.endswith('.7z') or filename.endswith('.exe') or filename.endswith('.zip'))
186+
if valid_ext:
187+
download_url = asset['browser_download_url']
188+
189+
# Try to extract version from filename first, then fall back to release name
190+
version_match = re.search(r'(\d+(?:\.\d+)+)', filename)
191+
if version_match:
192+
ver = version_match.group(1)
193+
assets.append({
194+
'version': ver,
195+
'url': download_url,
196+
'filename': filename
197+
})
198+
print(f"Found: {filename} -> Version: {ver} (from filename)")
199+
elif release_name_version:
200+
ver = release_name_version
201+
assets.append({
202+
'version': ver,
203+
'url': download_url,
204+
'filename': filename
205+
})
206+
print(f"Found: {filename} -> Version: {ver} (from release name)")
207+
else:
208+
print(f"ERROR: Could not extract version for nodejs from release name or filename: {filename}")
209+
print(f"Release name: {release_data.get('name', 'N/A')}")
210+
exit(1)
178211
elif module_name == 'ghostscript':
179212
# For ghostscript, files are named like gs10051w64.7z where 10051 = version 10.05.1
180213
# Pattern: gs + version_without_dots + w32/w64 + .7z
@@ -286,6 +319,10 @@ jobs:
286319
print(f"No valid assets found in release")
287320
print(f"Expected: .7z, .exe, or .zip files starting with 'portable'")
288321
print(f"Available assets: {[a['name'] for a in release_data.get('assets', [])]}")
322+
elif module_name == 'nodejs':
323+
print(f"No valid assets found in release")
324+
print(f"Expected: .7z, .exe, or .zip files starting with 'node-'")
325+
print(f"Available assets: {[a['name'] for a in release_data.get('assets', [])]}")
289326
elif module_name == 'ghostscript':
290327
print(f"No valid ghostscript assets found in release")
291328
print(f"Expected: .7z files matching pattern gs<version>w32/w64.7z")

0 commit comments

Comments
 (0)