diff --git a/.github/workflows/beta-release.yml b/.github/workflows/beta-release.yml index 7cb1e756e..fa8b0f412 100644 --- a/.github/workflows/beta-release.yml +++ b/.github/workflows/beta-release.yml @@ -41,9 +41,11 @@ jobs: - name: Create release branch env: VERSION: ${{ inputs.version }} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | git config user.name "github-actions[bot]" git config user.email "github-actions[bot]@users.noreply.github.com" + git remote set-url origin "https://x-access-token:${GITHUB_TOKEN}@github.com/${{ github.repository }}.git" # Delete remote branch if it exists git push origin --delete "release-${VERSION}" || true # Delete local branch if it exists diff --git a/extra/beta/update-version.js b/extra/beta/update-version.js index 240d44608..5465763df 100644 --- a/extra/beta/update-version.js +++ b/extra/beta/update-version.js @@ -58,8 +58,8 @@ function commit(version) { throw new Error("commit error"); } - res = childProcess.spawnSync("git", ["push", "origin", "master"]); - console.log(res.stdout.toString().trim()); + // Note: Push is handled by gh pr create in the release script + // No need to push here as we're on a release branch, not master } /** diff --git a/extra/release/beta.mjs b/extra/release/beta.mjs index 3516a5fa4..d951bcba8 100644 --- a/extra/release/beta.mjs +++ b/extra/release/beta.mjs @@ -13,7 +13,6 @@ import { createReleasePR, } from "./lib.mjs"; import semver from "semver"; -import { spawnSync } from "node:child_process"; const repoNames = getRepoNames(); const version = process.env.RELEASE_BETA_VERSION; @@ -51,10 +50,7 @@ await checkTagExists(repoNames, version); // node extra/beta/update-version.js execSync("node ./extra/beta/update-version.js"); -// Git Push -spawnSync("git", ["push", "origin", branchName], { stdio: "inherit" }); - -// Create Pull Request +// Create Pull Request (gh pr create will handle pushing the branch) await createReleasePR(version, previousVersion, dryRun, branchName, githubRunId); // Build frontend dist