Skip to content

AI-native knowledge base & Evernote/Obsidian alternative with instant sync & native MCP. Free on Cloudflare or self-hosted via Docker.

fix(ci): read Draft release assets through gh

tianma-ifb71daef0e35b
diff --git a/.github/workflows/desktop-build.yml b/.github/workflows/desktop-build.yml
index 996107ab..56ce1a80 100644
--- a/.github/workflows/desktop-build.yml
+++ b/.github/workflows/desktop-build.yml
@@ -79,7 +79,9 @@ jobs:
fi
mapfile -t current_assets < <(
- gh api "repos/${GITHUB_REPOSITORY}/releases/tags/${CURRENT_TAG}" \
+ gh release view "$CURRENT_TAG" \
+ --repo "$GITHUB_REPOSITORY" \
+ --json assets \
--jq '.assets[].name'
)
asset_ready="$(
diff --git a/.github/workflows/mobile-build.yml b/.github/workflows/mobile-build.yml
index da78e59b..7c75dc4e 100644
--- a/.github/workflows/mobile-build.yml
+++ b/.github/workflows/mobile-build.yml
@@ -119,7 +119,9 @@ jobs:
fi
mapfile -t current_assets < <(
- gh api "repos/${GITHUB_REPOSITORY}/releases/tags/${CURRENT_TAG}" \
+ gh release view "$CURRENT_TAG" \
+ --repo "$GITHUB_REPOSITORY" \
+ --json assets \
--jq '.assets[].name'
)
asset_ready="$(
diff --git a/scripts/desktop-build-workflow.test.mjs b/scripts/desktop-build-workflow.test.mjs
index 035e5d4f..5352f853 100644
--- a/scripts/desktop-build-workflow.test.mjs
+++ b/scripts/desktop-build-workflow.test.mjs
@@ -20,6 +20,10 @@ describe("desktop release workflow", () => {
const releasePlan = mobileWorkflow.indexOf(" - name: Compare with previous formal release");
expect(regressionTests).toBeGreaterThanOrEqual(0);
expect(regressionTests).toBeLessThan(releasePlan);
+ expect(workflow).toContain('gh release view "$CURRENT_TAG"');
+ expect(mobileWorkflow).toContain('gh release view "$CURRENT_TAG"');
+ expect(workflow).not.toContain('releases/tags/${CURRENT_TAG}');
+ expect(mobileWorkflow).not.toContain('releases/tags/${CURRENT_TAG}');
});
test("rejects a published APK that is not Play-signed and restores Draft state", () => {