Skip to content

Commit

Permalink
ci: Fix publish-release not respecting all includes
Browse files Browse the repository at this point in the history
  • Loading branch information
BlayTheNinth committed Dec 3, 2024
1 parent 9a080e3 commit 989006e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/publish-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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}};
Expand All @@ -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}};
Expand Down

0 comments on commit 989006e

Please sign in to comment.