diff --git a/.github/workflows/publish-release.yml b/.github/workflows/publish-release.yml index ddb124c..b59bc2d 100644 --- a/.github/workflows/publish-release.yml +++ b/.github/workflows/publish-release.yml @@ -58,8 +58,8 @@ jobs: script: | const fs = require('fs'); const settingsGradle = fs.readFileSync('settings.gradle', 'utf8'); - const includePattern = /^(?!\s*\/\/)\s*include\s*\(\s*["']([^"']+)["']\s*\)/gm; - const includes = [...settingsGradle.matchAll(includePattern)].map(match => match[1]); + const includePattern = /^(?!\s*\/\/)\s*include\s*\(\s*(['"]([^'"]+)['"](?:,\s*['"]([^'"]+)['"])*\s*)\)/gm; + const includes = [...settingsGradle.matchAll(includePattern)].flatMap(match => match[0].match(/['"]([^'"]+)['"]/g).map(item => item.replace(/['"]/g, ''))); const includeFabric = includes.includes('fabric') && ${{inputs.fabric}}; const includeForge = includes.includes('forge') && ${{inputs.forge}}; const includeNeoForge = includes.includes('neoforge') && ${{inputs.neoforge}}; @@ -73,8 +73,8 @@ jobs: script: | const fs = require('fs'); const settingsGradle = fs.readFileSync('settings.gradle', 'utf8'); - const includePattern = /^(?!\s*\/\/)\s*include\s*\(\s*["']([^"']+)["']\s*\)/gm; - const includes = [...settingsGradle.matchAll(includePattern)].map(match => match[1]); + const includePattern = /^(?!\s*\/\/)\s*include\s*\(\s*(['"]([^'"]+)['"](?:,\s*['"]([^'"]+)['"])*\s*)\)/gm; + const includes = [...settingsGradle.matchAll(includePattern)].flatMap(match => match[0].match(/['"]([^'"]+)['"]/g).map(item => item.replace(/['"]/g, ''))); const includeFabric = includes.includes('fabric') && ${{inputs.fabric}}; const includeForge = includes.includes('forge') && ${{inputs.forge}}; const includeNeoForge = includes.includes('neoforge') && ${{inputs.neoforge}};