Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 0 additions & 10 deletions setup.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,6 @@ function safeExec(command, description) {
}
}

function configureNpmToken(isPrivate) {
if (!isPrivate) {
console.log('⏳ Fetching NPM token from secrets repository...');
const npmToken = exec('gh api repos/domdomegg/secrets/contents/npm.txt --jq .content | base64 -d').trim();
exec(`gh secret set NPM_TOKEN --body "${npmToken}"`);
console.log('✅ NPM_TOKEN secret configured');
}
}

function updatePackageJson(packageName, repoUrl, isPrivate) {
const packageJsonPath = path.join(__dirname, 'package.json');
const packageJson = JSON.parse(fs.readFileSync(packageJsonPath, 'utf8'));
Expand Down Expand Up @@ -198,7 +189,6 @@ async function main() {

const isPrivate = process.argv.includes('--private');

configureNpmToken(isPrivate);
updatePackageJson(packageName, repoUrl, isPrivate);
enableGitHubActionsPermissions();
setupBranchProtection();
Expand Down