Co-authored-by: gemini-cli-robot <gemini-cli-robot@google.com>
This commit is contained in:
matt korwel
2025-09-19 01:23:55 -07:00
committed by GitHub
parent 44805f4d58
commit 47e8822467
2 changed files with 10 additions and 9 deletions

View File

@@ -98,6 +98,14 @@ async function main() {
// Workaround for workflow permission issues: create branch from HEAD then reset to tag
run(`git checkout -b ${releaseBranch}`, dryRun);
run(`git reset --hard ${latestTag}`, dryRun);
// Ensure we're using GITHUB_TOKEN (with actions:write) for pushing workflow files
const githubToken = process.env.GITHUB_TOKEN;
const repo = process.env.GITHUB_REPOSITORY || 'google-gemini/gemini-cli';
if (githubToken) {
run(`git remote set-url origin https://x-access-token:${githubToken}@github.com/${repo}.git`, dryRun);
}
run(`git push origin ${releaseBranch}`, dryRun);
} else {
console.log(`Release branch ${releaseBranch} already exists.`);