AI-native knowledge base & Evernote/Obsidian alternative with instant sync & native MCP. Free on Cloudflare or self-hosted via Docker.
HTML ai-agentcloudflarecloudflare-d1cloudflare-r2cloudflare-workersdockerelectronevernoteevernote-alternativeknowledge-basemcpnote-takingobsidian-alternativeoffline-firstpersonal-knowledge-basepwaself-hostedsqlitetiptapweb-clipper
fix(release): deliver Draft assets from target commit
tianma-ifc17f7c988806
diff --git a/.github/workflows/store-delivery.yml b/.github/workflows/store-delivery.ymlindex 2b19bd39..693fa6a3 100644--- a/.github/workflows/store-delivery.yml+++ b/.github/workflows/store-delivery.yml@@ -42,13 +42,8 @@ jobs:outputs:version: ${{ steps.validate.outputs.version }}version_code: ${{ steps.validate.outputs.version_code }}+ release_target: ${{ steps.release.outputs.release_target }}steps:- - name: Check out the immutable Release tag- uses: actions/checkout@v5- with:- ref: ${{ inputs.release_tag }}- fetch-depth: 0-- name: Validate Release and resolve its formal predecessorid: releaseenv:@@ -64,7 +59,9 @@ jobs:test "$(jq -r '.tag_name' <<<"$release")" = "$RELEASE_TAG"release_target="$(jq -r '.target_commitish' <<<"$release")"- test "$(git rev-parse "${RELEASE_TAG}^{commit}")" = "$(git rev-parse "${release_target}^{commit}")"+ test -n "$release_target"+ test "$release_target" != "null"+ echo "release_target=$release_target" >> "$GITHUB_OUTPUT"mapfile -t release_tags < <(gh api "repos/${GITHUB_REPOSITORY}/releases?per_page=100" \@@ -87,9 +84,22 @@ jobs:test "$current_found" = "true"fitest -n "$previous_tag"- git fetch origin "refs/tags/${previous_tag}:refs/tags/${previous_tag}"echo "previous_tag=$previous_tag" >> "$GITHUB_OUTPUT"+ - name: Check out the immutable Release target+ uses: actions/checkout@v5+ with:+ ref: ${{ steps.release.outputs.release_target }}+ fetch-depth: 0++ - name: Validate the checked-out Release target+ env:+ PREVIOUS_TAG: ${{ steps.release.outputs.previous_tag }}+ RELEASE_TARGET: ${{ steps.release.outputs.release_target }}+ run: |+ test "$(git rev-parse HEAD)" = "$(git rev-parse "${RELEASE_TARGET}^{commit}")"+ git fetch origin "refs/tags/${PREVIOUS_TAG}:refs/tags/${PREVIOUS_TAG}"+- name: Validate mobile version and audited change rangeid: validateenv:@@ -121,10 +131,10 @@ jobs:ANDROID_SDK_ROOT: /opt/homebrew/share/android-commandlinetoolsJAVA_HOME: /opt/homebrew/opt/openjdk@17/libexec/openjdk.jdk/Contents/Homesteps:- - name: Check out the immutable Release tag+ - name: Check out the immutable Release targetuses: actions/checkout@v5with:- ref: ${{ inputs.release_tag }}+ ref: ${{ needs.plan.outputs.release_target }}clean: true- name: Set up Bun@@ -229,10 +239,10 @@ jobs:timeout-minutes: 90environment: store-deliverysteps:- - name: Check out the immutable Release tag+ - name: Check out the immutable Release targetuses: actions/checkout@v5with:- ref: ${{ inputs.release_tag }}+ ref: ${{ needs.plan.outputs.release_target }}- name: Set up Bunuses: oven-sh/setup-bun@v2diff --git a/scripts/store-delivery.test.mjs b/scripts/store-delivery.test.mjsindex 3b689313..f5940c82 100644--- a/scripts/store-delivery.test.mjs+++ b/scripts/store-delivery.test.mjs@@ -4,9 +4,7 @@ import { parseStoreDeliveryArgs } from "./store-delivery.mjs";describe("store delivery command", () => {test("uses full production delivery defaults", () => {- expect(- parseStoreDeliveryArgs(["--release", "v1.7.0"]),- ).toMatchObject({+ expect(parseStoreDeliveryArgs(["--release", "v1.7.0"])).toMatchObject({releaseTag: "v1.7.0",platform: "both",androidTrack: "production",@@ -15,19 +13,15 @@ describe("store delivery command", () => {test("accepts an explicit single platform", () => {expect(- parseStoreDeliveryArgs([- "--release",- "v1.7.0",- "--platform",- "ios",- ]).platform,+ parseStoreDeliveryArgs(["--release", "v1.7.0", "--platform", "ios"])+ .platform,).toBe("ios");});test("rejects malformed release tags", () => {- expect(() =>- parseStoreDeliveryArgs(["--release", "latest"])- ).toThrow("stable vX.Y.Z");+ expect(() => parseStoreDeliveryArgs(["--release", "latest"])).toThrow(+ "stable vX.Y.Z",+ );});test("uses the pinned official EAS CLI setup in store jobs", () => {@@ -37,7 +31,9 @@ describe("store delivery command", () => {);expect(workflow).not.toContain("bunx eas-cli");- expect(workflow.match(/uses: expo\/expo-github-action@v8/g)).toHaveLength(2);+ expect(workflow.match(/uses: expo\/expo-github-action@v8/g)).toHaveLength(+ 2,+ );expect(workflow.match(/eas-version: 21\.4\.0/g)).toHaveLength(2);expect(workflow.match(/packager: npm/g)).toHaveLength(2);});@@ -62,23 +58,48 @@ describe("store delivery command", () => {expect(workflow).toContain('if [[ "$release_is_draft" = "true" ]]');expect(workflow).toContain('previous_tag="${release_tags[0]:-}"');- expect(workflow).not.toContain('test "$(jq -r \'.draft\' <<<"$release")" = "false"');+ expect(workflow).toContain(+ "release_target: ${{ steps.release.outputs.release_target }}",+ );+ expect(workflow).toContain(+ "ref: ${{ steps.release.outputs.release_target }}",+ );+ expect(+ workflow.match(/ref: \$\{\{ needs\.plan\.outputs\.release_target \}\}/g),+ ).toHaveLength(2);+ expect(workflow).not.toContain("ref: ${{ inputs.release_tag }}");+ expect(workflow).not.toContain(+ 'test "$(jq -r \'.draft\' <<<"$release")" = "false"',+ );});test("uses a dedicated Draft audit that accepts only the Play app signer", () => {const workflow = readFileSync(- new URL("../.github/workflows/android-play-signature-audit.yml", import.meta.url),+ new URL(+ "../.github/workflows/android-play-signature-audit.yml",+ import.meta.url,+ ),"utf8",);expect(workflow).toContain("github.repository == 'tianma-if/edgeever'");- expect(workflow).toContain("permissions:\n # Draft Releases are only visible to a token with repository write access.\n contents: write");+ expect(workflow).toContain(+ "permissions:\n # Draft Releases are only visible to a token with repository write access.\n contents: write",+ );expect(workflow).toContain('gh release view "$RELEASE_TAG"');- expect(workflow).toContain('test "$(jq -r \'.isDraft\' <<<"$release")" = "true"');- expect(workflow).toContain("ref: ${{ steps.release.outputs.target_commitish }}");+ expect(workflow).toContain(+ 'test "$(jq -r \'.isDraft\' <<<"$release")" = "true"',+ );+ expect(workflow).toContain(+ "ref: ${{ steps.release.outputs.target_commitish }}",+ );expect(workflow).not.toContain("ref: ${{ inputs.release_tag }}");- expect(workflow).toContain("EDGE_EVER_ANDROID_ALLOWED_SIGNER_SHA256: ${{ secrets.ANDROID_PLAY_APP_SIGNER_SHA256 }}");- expect(workflow).not.toContain("22bf52a9501c89020f5acc966960152c826bfa64f31e578e858d088f8cd75d87");+ expect(workflow).toContain(+ "EDGE_EVER_ANDROID_ALLOWED_SIGNER_SHA256: ${{ secrets.ANDROID_PLAY_APP_SIGNER_SHA256 }}",+ );+ expect(workflow).not.toContain(+ "22bf52a9501c89020f5acc966960152c826bfa64f31e578e858d088f8cd75d87",+ );});test("keeps the Play bundle and generated Release APK arm64-only", () => {