Skip to content

Commit 4bc85ff

Browse files
committed
fix(release): keep fork stable desktop updates on fork feeds
1 parent ba0464c commit 4bc85ff

2 files changed

Lines changed: 4 additions & 2 deletions

File tree

‎.github/workflows/desktop-package.yml‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -144,8 +144,8 @@ jobs:
144144
NODE_OPTIONS: --max-old-space-size=6144
145145
OPENBITFUN_ENABLE_UPDATER_ARTIFACTS: ${{ needs.prepare.outputs.upload_to_release }}
146146
OPENBITFUN_RELEASE_CHANNEL: ${{ needs.prepare.outputs.release_channel }}
147-
TAURI_UPDATER_ENDPOINT: ${{ github.repository != 'GCWing/OpenBitFun' && needs.prepare.outputs.release_channel == 'beta' && format('https://github.com/{0}/releases/download/channel-v1-beta/latest-v1.json', github.repository) || '' }}
148-
TAURI_UPDATER_FALLBACK_ENDPOINT: ${{ github.repository != 'GCWing/OpenBitFun' && needs.prepare.outputs.release_channel == 'beta' && format('https://github.com/{0}/releases/download/channel-v1-beta/latest-v1.json', github.repository) || '' }}
147+
TAURI_UPDATER_ENDPOINT: ${{ github.repository != 'GCWing/OpenBitFun' && (needs.prepare.outputs.release_channel == 'beta' && format('https://github.com/{0}/releases/download/channel-v1-beta/latest-v1.json', github.repository) || format('https://github.com/{0}/releases/latest/download/latest-v1.json', github.repository)) || '' }}
148+
TAURI_UPDATER_FALLBACK_ENDPOINT: ${{ github.repository != 'GCWing/OpenBitFun' && (needs.prepare.outputs.release_channel == 'beta' && format('https://github.com/{0}/releases/download/channel-v1-beta/latest-v1.json', github.repository) || format('https://github.com/{0}/releases/latest/download/latest-v1.json', github.repository)) || '' }}
149149
TAURI_UPDATER_PUBKEY: ${{ secrets.TAURI_UPDATER_PUBKEY }}
150150
# Same trust root, compiled into the Desktop binary so one-click relay
151151
# deploy can verify the signed checksum locally and hand the remote host

‎scripts/check-github-config.test.mjs‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1134,6 +1134,8 @@ test('Desktop packaging keeps beta identity explicit and stable-safe', () => {
11341134
);
11351135
assert.match(packageJob.env.TAURI_UPDATER_ENDPOINT, /github\.repository/);
11361136
assert.match(packageJob.env.TAURI_UPDATER_ENDPOINT, /channel-v1-beta/);
1137+
assert.ok(packageJob.env.TAURI_UPDATER_ENDPOINT.includes("format('https://github.com/{0}/releases/latest/download/latest-v1.json', github.repository)"));
1138+
assert.equal(packageJob.env.TAURI_UPDATER_ENDPOINT, packageJob.env.TAURI_UPDATER_FALLBACK_ENDPOINT);
11371139
assert.match(packageJob.env.OPENBITFUN_RELEASE_PUBKEY, /OPENBITFUN_RELEASE_PUBKEY/);
11381140
const appleSetupIndex = packageJob.steps.findIndex(
11391141
(step) => step.name === 'Configure Apple Developer ID signing and notarization',

0 commit comments

Comments
 (0)