-
Notifications
You must be signed in to change notification settings - Fork 129
feat(release): split updater manifest by channel from tag suffix #330
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -8,6 +8,13 @@ const target = process.env.OPENLESS_UPDATE_TARGET; | |
| const arch = process.env.OPENLESS_UPDATE_ARCH; | ||
| const repo = process.env.OPENLESS_UPDATE_REPO || 'appergb/openless'; | ||
| const mirrorBaseUrl = process.env.OPENLESS_UPDATE_MIRROR_BASE_URL || 'https://fastgit.cc/https://github.com'; | ||
| // 渠道决定 manifest 文件名后缀:stable → 旧文件名(向后兼容);beta → 加 -beta 后缀, | ||
| // 让 stable 用户的 endpoint 永远拿不到 beta 包。空 / 未设置 = stable。 | ||
| const rawChannel = (process.env.OPENLESS_RELEASE_CHANNEL || 'stable').toLowerCase(); | ||
| if (rawChannel !== 'stable' && rawChannel !== 'beta') { | ||
| throw new Error(`Invalid OPENLESS_RELEASE_CHANNEL: "${rawChannel}" (expected "stable" or "beta")`); | ||
| } | ||
| const channelSuffix = rawChannel === 'beta' ? '-beta' : ''; | ||
|
|
||
| if (!target || !arch) { | ||
| throw new Error('OPENLESS_UPDATE_TARGET and OPENLESS_UPDATE_ARCH are required'); | ||
|
|
@@ -55,8 +62,8 @@ if (!existsSync(signaturePath)) { | |
| } | ||
|
|
||
| const assetName = basename(artifact); | ||
| const manifestName = `latest-${target}-${arch}.json`; | ||
| const mirrorManifestName = `latest-${target}-${arch}-mirror.json`; | ||
| const manifestName = `latest-${target}-${arch}${channelSuffix}.json`; | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
When Useful? React with 👍 / 👎. |
||
| const mirrorManifestName = `latest-${target}-${arch}${channelSuffix}-mirror.json`; | ||
| const githubAssetUrl = `https://github.com/${repo}/releases/latest/download/${assetName}`; | ||
| const mirrorAssetUrl = `${mirrorBaseUrl.replace(/\/$/, '')}/${repo}/releases/latest/download/${assetName}`; | ||
| const manifest = { | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This adds a second
env:mapping under the samejobs.buildobject, while the workflow already has another job-levelenvbelowruns-onfor the Tauri signing secrets. YAML cannot keep both mappings for the same key (parsers either reject the workflow or keep only one; e.g. the later block drops thisOPENLESS_RELEASE_CHANNELvalue), so av*-beta-taurirun will not propagatebetato the manifest step andprereleaseevaluates false. Put this variable into the existing jobenvblock instead.Useful? React with 👍 / 👎.