Compare commits
5
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c273734aec | ||
|
|
f89cbff37e | ||
|
|
f92aee9b4c | ||
|
|
2192a19d50 | ||
|
|
9411d0945a |
No files matched your search
@@ -303,6 +303,20 @@ jobs:
|
||||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
run: gh release download "${GITHUB_REF_NAME}" --pattern '*.sig' --dir release-check/signatures
|
||||
|
||||
# Publish the draft release before generating the updater manifest. While
|
||||
# the release is a draft GitHub reports asset URLs as
|
||||
# `.../releases/download/untagged-<hash>/...`; only after publishing does
|
||||
# the manifest point at the stable `.../releases/download/<tag>/...` path.
|
||||
- name: Publish release
|
||||
env:
|
||||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
run: |
|
||||
if [[ "${GITHUB_REF_NAME}" == *-* ]]; then
|
||||
gh release edit "${GITHUB_REF_NAME}" --draft=false --prerelease
|
||||
else
|
||||
gh release edit "${GITHUB_REF_NAME}" --draft=false --latest
|
||||
fi
|
||||
|
||||
- name: Download release metadata
|
||||
env:
|
||||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
@@ -329,31 +343,6 @@ jobs:
|
||||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
run: gh release upload "${GITHUB_REF_NAME}" release-check/latest.json --clobber
|
||||
|
||||
- name: Publish release
|
||||
env:
|
||||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
run: |
|
||||
if [[ "${GITHUB_REF_NAME}" == *-* ]]; then
|
||||
gh release edit "${GITHUB_REF_NAME}" --draft=false --prerelease
|
||||
else
|
||||
gh release edit "${GITHUB_REF_NAME}" --draft=false --latest
|
||||
fi
|
||||
|
||||
- name: Refresh published GitHub release metadata
|
||||
env:
|
||||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
run: |
|
||||
release_id="$(
|
||||
gh api "repos/${GITHUB_REPOSITORY}/releases" \
|
||||
--paginate \
|
||||
--jq ".[] | select(.tag_name == \"${GITHUB_REF_NAME}\") | .id"
|
||||
)"
|
||||
if [[ -z "$release_id" ]]; then
|
||||
echo "Published release ${GITHUB_REF_NAME} was not found"
|
||||
exit 1
|
||||
fi
|
||||
gh api "repos/${GITHUB_REPOSITORY}/releases/${release_id}" > release-check/release.json
|
||||
|
||||
- name: Build Update Server artifact catalog
|
||||
run: |
|
||||
node scripts/axolotl/create-update-server-catalog.mjs \
|
||||
|
||||
@@ -5,13 +5,13 @@
|
||||
<p><strong>次世代 Minecraft 桌面客户端,全能、美观、全平台覆盖。</strong></p>
|
||||
|
||||
<p>
|
||||
<a href="https://git.starlight.cool/AxTps/Starlight_Lancher/actions">
|
||||
<img src="https://img.shields.io/badge/Repo-git.starlight.cool-blue?style=for-the-badge&logo=git" alt="Repository" />
|
||||
<a href="https://github.com/ApTx2012/Starlight_Lancher/actions">
|
||||
<img src="https://img.shields.io/badge/Repo-GitHub-black?style=for-the-badge&logo=github" alt="Repository" />
|
||||
</a>
|
||||
<a href="https://git.starlight.cool/AxTps/Starlight_Lancher/releases">
|
||||
<a href="https://github.com/ApTx2012/Starlight_Lancher/releases">
|
||||
<img src="https://img.shields.io/badge/Releases-Download-green?style=for-the-badge&logo=github" alt="Releases" />
|
||||
</a>
|
||||
<a href="https://git.starlight.cool/AxTps/Starlight_Lancher/stargazers">
|
||||
<a href="https://github.com/ApTx2012/Starlight_Lancher/stargazers">
|
||||
<img src="https://img.shields.io/badge/Stars-★-ffb800?style=for-the-badge&logo=github" alt="Stars" />
|
||||
</a>
|
||||
<a href="COPYING.md">
|
||||
@@ -21,7 +21,7 @@
|
||||
|
||||
<p>
|
||||
<a href="https://skin.starlight.cool/">官方网站</a> |
|
||||
<a href="https://git.starlight.cool/AxTps/Starlight_Lancher/releases/latest">下载最新版</a> |
|
||||
<a href="https://github.com/ApTx2012/Starlight_Lancher/releases/latest">下载最新版</a> |
|
||||
<a href="CONTRIBUTING.md">参与贡献</a>
|
||||
| <a href="CODE_OF_CONDUCT.md">行为准则</a>
|
||||
</p>
|
||||
@@ -57,7 +57,7 @@ _(注:本项目是调用 Modrinth 公开 API 的独立客户端,与 Rinth, I
|
||||
|
||||
## 下载与安装
|
||||
|
||||
请前往 [Releases](https://git.starlight.cool/AxTps/Starlight_Lancher/releases/latest) 下载适合你操作系统的最新安装包。
|
||||
请前往 [Releases](https://github.com/ApTx2012/Starlight_Lancher/releases/latest) 下载适合你操作系统的最新安装包。
|
||||
已安装的用户每次均可通过内置的 Tauri 签名校验机制,自动在后台完成更新,无需手动下载安装更新。
|
||||
|
||||
| 系统平台 | 推荐下载文件 |
|
||||
|
||||
File diff suppressed because it is too large.
Load diff
@@ -569,9 +569,9 @@ fn is_dev() -> bool {
|
||||
|
||||
#[tauri::command]
|
||||
fn are_updates_enabled() -> bool {
|
||||
// Temporarily disabled: enabling the built-in updater causes an immediate
|
||||
// crash on Windows (c0000409) at startup, pending a fix.
|
||||
// StarLight launcher ships without the built-in update checker.
|
||||
// Keep the backend interface in place for a future user-supplied
|
||||
// update URL to be wired in by replacing this no-op gate later.
|
||||
false
|
||||
}
|
||||
|
||||
|
||||
+75
-2762
File diff suppressed because it is too large.
Load diff
@@ -1,6 +1,15 @@
|
||||
import fs from 'node:fs'
|
||||
import path from 'node:path'
|
||||
|
||||
// Build a stable release download URL from the tag and asset name instead of
|
||||
// relying on `browser_download_url`. While the release is still a draft GitHub
|
||||
// reports the asset URL as `.../releases/download/untagged-<hash>/...`, which
|
||||
// would make the updater manifest point at a path that disappears once the
|
||||
// release is published.
|
||||
function buildDownloadUrl(assetName, versionTag) {
|
||||
const repository = process.env.GITHUB_REPOSITORY || 'ApTx2012/Starlight_Lancher'
|
||||
return `https://github.com/${repository}/releases/download/${versionTag}/${encodeURIComponent(assetName)}`
|
||||
}
|
||||
const [releasePath, signaturesPath, tag, outputPath] = process.argv.slice(2)
|
||||
|
||||
if (!releasePath || !signaturesPath || !tag || !outputPath) {
|
||||
@@ -52,10 +61,7 @@ for (const target of targets) {
|
||||
}
|
||||
|
||||
const signature = fs.readFileSync(signaturePath, 'utf8')
|
||||
const url = asset.browser_download_url ?? asset.url
|
||||
if (!url) {
|
||||
throw new Error(`Release asset ${asset.name} does not contain a download URL`)
|
||||
}
|
||||
const url = buildDownloadUrl(asset.name, tag)
|
||||
|
||||
for (const platform of target.platforms) {
|
||||
platforms[platform] = { signature, url }
|
||||
@@ -81,8 +87,8 @@ for (const target of [
|
||||
)
|
||||
}
|
||||
const asset = matches[0]
|
||||
const url = asset.browser_download_url ?? asset.url
|
||||
if (!url || !Number.isSafeInteger(asset.size) || asset.size <= 0) {
|
||||
const url = buildDownloadUrl(asset.name, tag)
|
||||
if (!Number.isSafeInteger(asset.size) || asset.size <= 0) {
|
||||
throw new Error(`Release asset ${asset.name} has invalid download metadata`)
|
||||
}
|
||||
apt[target.platform] = {
|
||||
|
||||
Reference in new issue
Block a user