mirror of
https://github.com/louislam/uptime-kuma.git
synced 2026-03-03 00:37:01 +00:00
fix: final fix of beta workflow (#6713)
This commit is contained in:
3
.github/workflows/beta-release.yml
vendored
3
.github/workflows/beta-release.yml
vendored
@@ -50,7 +50,8 @@ jobs:
|
||||
git push origin --delete "release-${VERSION}" || true
|
||||
# Delete local branch if it exists
|
||||
git branch -D "release-${VERSION}" || true
|
||||
# Create new branch from master
|
||||
# For testing purpose
|
||||
# git checkout beta-workflow
|
||||
git checkout -b "release-${VERSION}"
|
||||
|
||||
- name: Install dependencies
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
import { createRequire } from "module";
|
||||
const require = createRequire(import.meta.url);
|
||||
|
||||
const pkg = require("../../package.json");
|
||||
const fs = require("fs");
|
||||
const childProcess = require("child_process");
|
||||
@@ -58,8 +61,13 @@ function commit(version) {
|
||||
throw new Error("commit error");
|
||||
}
|
||||
|
||||
// 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
|
||||
// Get the current branch name
|
||||
res = childProcess.spawnSync("git", ["rev-parse", "--abbrev-ref", "HEAD"]);
|
||||
let branchName = res.stdout.toString().trim();
|
||||
console.log("Current branch:", branchName);
|
||||
|
||||
// Git push the branch
|
||||
childProcess.spawnSync("git", ["push", "origin", branchName, "--force"], { stdio: "inherit" });
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -48,7 +48,7 @@ checkDocker();
|
||||
await checkTagExists(repoNames, version);
|
||||
|
||||
// node extra/beta/update-version.js
|
||||
execSync("node ./extra/beta/update-version.js");
|
||||
await import("../beta/update-version.mjs");
|
||||
|
||||
// Create Pull Request (gh pr create will handle pushing the branch)
|
||||
await createReleasePR(version, previousVersion, dryRun, branchName, githubRunId);
|
||||
|
||||
Reference in New Issue
Block a user