Compare commits
3
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
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 \
|
||||
|
||||
File diff suppressed because it is too large.
Load diff
@@ -569,10 +569,9 @@ fn is_dev() -> bool {
|
||||
|
||||
#[tauri::command]
|
||||
fn are_updates_enabled() -> bool {
|
||||
// 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
|
||||
// StarLight launcher enables the built-in updater; the endpoint and
|
||||
// signing public key are configured in tauri-release.conf.json.
|
||||
true
|
||||
}
|
||||
|
||||
#[cfg(feature = "updater")]
|
||||
|
||||
+64
-2768
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