fix(release): correct gitea and github repository paths in update and release workflows
This commit is contained in:
1 parent
fae001cc1d
commit
70367cc058
5 files changed
+54
-54
No files matched your search
+11
-11
@@ -9,12 +9,12 @@ import { printJson } from "../printer.js";
|
||||
import { STATE_DIR } from "./service.js";
|
||||
import type { CliRuntime } from "../types.js";
|
||||
|
||||
const DEFAULT_GITHUB_REPO = "yunyingk/seal-use";
|
||||
const LEGACY_GITHUB_REPO = "yunyingk/seal-use";
|
||||
const DEFAULT_GITHUB_REPO = "yunyingk/seal-home";
|
||||
const LEGACY_GITHUB_REPO = "yunyingk/seal-home";
|
||||
const UPDATE_URL_ENV = "SEAL_USE_UPDATE_URL";
|
||||
const LEGACY_UPDATE_URL_ENV = "SEAL_USE_UPDATE_URL";
|
||||
const LEGACY_UPDATE_URL_ENV = "SEAL_HOME_UPDATE_URL";
|
||||
const GITHUB_REPO_ENV = "SEAL_USE_GITHUB_REPO";
|
||||
const LEGACY_GITHUB_REPO_ENV = "SEAL_USE_GITHUB_REPO";
|
||||
const LEGACY_GITHUB_REPO_ENV = "SEAL_HOME_GITHUB_REPO";
|
||||
|
||||
export type UpdateOptions = {
|
||||
checkOnly?: boolean;
|
||||
@@ -316,8 +316,8 @@ async function fetchGitHubReleases(repo: string, limit = 20): Promise<GitHubRele
|
||||
};
|
||||
|
||||
const urls = [
|
||||
`https://git.ying-qing.cn/api/v1/repos/gitea/seal-use/releases?per_page=${limit}`,
|
||||
`https://git.ying-qing.cn/api/v1/repos/gitea/seal-use/releases?per_page=${limit}`,
|
||||
`https://git.ying-qing.cn/api/v1/repos/gitea/seal-home/releases?per_page=${limit}`,
|
||||
`https://git.ying-qing.cn/api/v1/repos/gitea/seal-home/releases?per_page=${limit}`,
|
||||
`https://api.github.com/repos/${repo}/releases?per_page=${limit}`
|
||||
];
|
||||
if (repo !== LEGACY_GITHUB_REPO) {
|
||||
@@ -381,14 +381,14 @@ async function fetchGitHubRelease(repo: string, targetVersion?: string): Promise
|
||||
|
||||
const urls = tag
|
||||
? [
|
||||
`https://git.ying-qing.cn/api/v1/repos/gitea/seal-use/releases/tags/${tag}`,
|
||||
`https://git.ying-qing.cn/api/v1/repos/gitea/seal-use/releases/tags/${tag}`,
|
||||
`https://git.ying-qing.cn/api/v1/repos/gitea/seal-home/releases/tags/${tag}`,
|
||||
`https://git.ying-qing.cn/api/v1/repos/gitea/seal-home/releases/tags/${tag}`,
|
||||
`https://api.github.com/repos/${repo}/releases/tags/${tag}`,
|
||||
...(repo !== LEGACY_GITHUB_REPO ? [`https://api.github.com/repos/${LEGACY_GITHUB_REPO}/releases/tags/${tag}`] : [])
|
||||
]
|
||||
: [
|
||||
`https://git.ying-qing.cn/api/v1/repos/gitea/seal-use/releases/latest`,
|
||||
`https://git.ying-qing.cn/api/v1/repos/gitea/seal-use/releases/latest`,
|
||||
`https://git.ying-qing.cn/api/v1/repos/gitea/seal-home/releases/latest`,
|
||||
`https://git.ying-qing.cn/api/v1/repos/gitea/seal-home/releases/latest`,
|
||||
`https://api.github.com/repos/${repo}/releases/latest`,
|
||||
...(repo !== LEGACY_GITHUB_REPO ? [`https://api.github.com/repos/${LEGACY_GITHUB_REPO}/releases/latest`] : [])
|
||||
];
|
||||
@@ -500,7 +500,7 @@ async function downloadFile(url: string, destPath: string, tagName?: string, ass
|
||||
|
||||
// 1. High-speed Gitea direct mirror first
|
||||
if (tag && fileName) {
|
||||
candidates.push(`https://git.ying-qing.cn/gitea/seal-use/releases/download/${tag}/${fileName}`);
|
||||
candidates.push(`https://git.ying-qing.cn/gitea/seal-home/releases/download/${tag}/${fileName}`);
|
||||
}
|
||||
if (url.startsWith("https://git.ying-qing.cn")) {
|
||||
candidates.push(url);
|
||||
|
||||
Reference in new issue
Block a user