Skip to content

Commit 704003b

Browse files
CopilotBunsDev
andauthored
Split tag-driven desktop release from manual iOS TestFlight release (#483)
Agent-Logs-Url: https://github.com/OpenKnots/okcode/sessions/ce03574c-94be-42d0-9506-81fdce257c40 Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: BunsDev <68980965+BunsDev@users.noreply.github.com>
1 parent ed0c873 commit 704003b

File tree

7 files changed

+52
-24
lines changed

7 files changed

+52
-24
lines changed

.github/workflows/release-ios.yml

Lines changed: 33 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,16 @@
11
name: Release iOS
22

33
on:
4-
push:
5-
tags:
6-
- "v*.*.*"
74
workflow_dispatch:
85
inputs:
96
version:
107
description: "Release version (for example 1.2.3 or v1.2.3)"
118
required: true
129
type: string
10+
ref:
11+
description: "Git ref to build (defaults to refs/tags/v<version>; may also be a branch or SHA)"
12+
required: false
13+
type: string
1314

1415
permissions:
1516
contents: read
@@ -23,7 +24,8 @@ jobs:
2324
tag: ${{ steps.release_meta.outputs.tag }}
2425
release_channel: ${{ steps.release_meta.outputs.release_channel }}
2526
build_timestamp: ${{ steps.release_meta.outputs.build_timestamp }}
26-
ref: ${{ github.sha }}
27+
ref: ${{ steps.release_meta.outputs.ref }}
28+
commit_sha: ${{ steps.resolved_commit.outputs.sha }}
2729
steps:
2830
- id: release_meta
2931
name: Resolve release version
@@ -33,8 +35,10 @@ jobs:
3335
3436
if [[ "${GITHUB_EVENT_NAME}" == "workflow_dispatch" ]]; then
3537
raw="${{ github.event.inputs.version }}"
38+
requested_ref="${{ github.event.inputs.ref }}"
3639
else
3740
raw="${GITHUB_REF_NAME}"
41+
requested_ref="${GITHUB_REF}"
3842
fi
3943
4044
version="${raw#v}"
@@ -43,18 +47,41 @@ jobs:
4347
exit 1
4448
fi
4549
50+
tag="v$version"
51+
if [[ "${GITHUB_EVENT_NAME}" == "workflow_dispatch" ]]; then
52+
if [[ -n "$requested_ref" ]]; then
53+
resolved_ref="$requested_ref"
54+
else
55+
resolved_ref="refs/tags/$tag"
56+
fi
57+
else
58+
resolved_ref="$requested_ref"
59+
fi
60+
4661
build_timestamp="$(date -u +"%Y-%m-%dT%H:%M:%SZ")"
4762
4863
echo "version=$version" >> "$GITHUB_OUTPUT"
49-
echo "tag=v$version" >> "$GITHUB_OUTPUT"
64+
echo "tag=$tag" >> "$GITHUB_OUTPUT"
5065
echo "build_timestamp=$build_timestamp" >> "$GITHUB_OUTPUT"
66+
echo "ref=$resolved_ref" >> "$GITHUB_OUTPUT"
5167
5268
if [[ "$version" =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
5369
echo "release_channel=stable" >> "$GITHUB_OUTPUT"
5470
else
5571
echo "release_channel=prerelease" >> "$GITHUB_OUTPUT"
5672
fi
5773
74+
- name: Checkout release ref
75+
uses: actions/checkout@v6
76+
with:
77+
ref: ${{ steps.release_meta.outputs.ref }}
78+
fetch-depth: 0
79+
80+
- id: resolved_commit
81+
name: Resolve release commit
82+
shell: bash
83+
run: echo "sha=$(git rev-parse HEAD)" >> "$GITHUB_OUTPUT"
84+
5885
ios_signing_preflight:
5986
name: iOS signing preflight
6087
needs: [preflight]
@@ -102,7 +129,7 @@ jobs:
102129
runs-on: macos-14
103130
env:
104131
RELEASE_VERSION: ${{ needs.preflight.outputs.version }}
105-
OKCODE_COMMIT_HASH: ${{ github.sha }}
132+
OKCODE_COMMIT_HASH: ${{ needs.preflight.outputs.commit_sha }}
106133
OKCODE_BUILD_TIMESTAMP: ${{ needs.preflight.outputs.build_timestamp }}
107134
OKCODE_RELEASE_CHANNEL: ${{ needs.preflight.outputs.release_channel }}
108135
steps:

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ Notes:
188188
Release is driven by `.github/workflows/release.yml` and the canonical runbook in
189189
[`docs/release.md`](/Users/buns/.okcode/worktrees/okcode/okcode-1c7a5554/docs/release.md).
190190

191-
- Release tags publish desktop artifacts and `okcodes` from `release.yml`, while `release-ios.yml` uploads the matching iOS TestFlight build separately.
191+
- Release tags publish desktop artifacts and `okcodes` from `release.yml`, while `release-ios.yml` is dispatched separately for the matching iOS TestFlight build.
192192
- Preflight runs format, lint, typecheck, tests, browser tests, desktop smoke, and release smoke.
193193
- The separate Intel mac workflow is compatibility-only and non-blocking.
194194
- Publishing still requires release notes and an asset manifest for the tagged version.
@@ -236,7 +236,7 @@ Release is driven by `.github/workflows/release.yml` and the canonical runbook i
236236
2. Confirm macOS, Windows, Linux, iOS TestFlight, and CLI release inputs are ready.
237237
3. Confirm signing secrets availability for macOS/Windows targets.
238238
4. Confirm `docs/releases/v<version>.md` and `docs/releases/v<version>/assets.md` exist.
239-
5. Trigger the desktop/CLI release and monitor both the desktop/CLI and iOS workflows.
239+
5. Trigger the desktop/CLI release, then dispatch and monitor the separate iOS workflow for the same version when needed.
240240

241241
## 12) Contributing expectations
242242

docs/release.md

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ The next stable train ships one semver across desktop, CLI, and iOS surfaces:
1111
- macOS arm64 desktop DMG plus updater metadata
1212
- Windows x64 signed NSIS installer
1313
- Linux x64 AppImage
14-
- iOS TestFlight build from the same tag
14+
- iOS TestFlight build from the same release tag, dispatched separately
1515
- `okcodes` npm package from the same tag
1616

1717
`docs/release.md` is the source of truth for release policy, release gates, and the platform matrix. Treat `docs/releases/README.md` and README release references as pointers only.
@@ -32,10 +32,10 @@ The next stable train ships one semver across desktop, CLI, and iOS surfaces:
3232

3333
## Release workflows
3434

35-
Official release tags now fan out into two workflows:
35+
Official release tags and follow-up mobile promotion now use two workflows:
3636

37-
- [`release.yml`](../.github/workflows/release.yml) for desktop artifacts, npm publish, GitHub Release publication, and finalize.
38-
- [`release-ios.yml`](../.github/workflows/release-ios.yml) for the matching TestFlight upload from the same tag.
37+
- [`release.yml`](../.github/workflows/release.yml) runs automatically on release tags for desktop artifacts, npm publish, GitHub Release publication, and finalize.
38+
- [`release-ios.yml`](../.github/workflows/release-ios.yml) is dispatched manually for the matching version/ref when we want the TestFlight upload.
3939

4040
`release.yml` job order:
4141

@@ -114,6 +114,7 @@ Non-blocking compatibility lane:
114114
- Build the mobile web bundle and sync Capacitor before archiving.
115115
- Run a simulator build in CI before archive/upload.
116116
- Upload the archive to TestFlight from the dedicated `release-ios.yml` workflow.
117+
- Dispatch `release-ios.yml` with the release version and matching tag/ref (defaults to `refs/tags/vX.Y.Z`).
117118
- During RC soak, manually verify on:
118119
- one current supported iPhone/iOS
119120
- one older supported iPhone/iOS
@@ -175,12 +176,12 @@ If any blocker fails, cut a new RC and repeat the soak.
175176
## Post-release expectations
176177

177178
- The GitHub release includes desktop artifacts plus release notes and asset manifest.
178-
- iOS is distributed through TestFlight by `release-ios.yml`, not attached to the GitHub release.
179+
- iOS is distributed through TestFlight by a separate `release-ios.yml` dispatch against the release tag, not attached to the GitHub release.
179180
- `finalize` updates version strings and pushes the post-release bump to `main`.
180181

181182
## Troubleshooting
182183

183184
- If `preflight` fails, reproduce locally with the exact failing command before retriggering the workflow.
184185
- If `desktop_build` fails, inspect the target-specific signing secrets first.
185-
- If `ios_testflight` fails, re-check provisioning, App Store Connect API key setup, and archive/export logs in `release-ios.yml`.
186+
- If `ios_testflight` fails, re-check provisioning, App Store Connect API key setup, the dispatched ref, and archive/export logs in `release-ios.yml`.
186187
- If `publish_cli` fails, do not continue the train. Fix the publish issue so the app and CLI do not drift.

docs/releases/v0.26.0.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,9 @@ File-content search, desktop terminal docking, transport snapshot fixes, updated
2121

2222
## Upgrade and install
2323

24-
- **CLI:** `npm install -g okcodes@0.26.0` once the coordinated release workflow finishes.
24+
- **CLI:** `npm install -g okcodes@0.26.0` once the desktop/CLI release workflow finishes.
2525
- **Desktop:** Download from [GitHub Releases](https://github.com/OpenKnots/okcode/releases/tag/v0.26.0). Filenames are listed in [assets.md](v0.26.0/assets.md).
26-
- **iOS:** Available via TestFlight (uploaded automatically by the Release iOS workflow).
26+
- **iOS:** Available via TestFlight after the separate Release iOS workflow is dispatched for this tag.
2727

2828
## Known limitations
2929

@@ -32,5 +32,5 @@ OK Code remains early work in progress. Expect rough edges around session recove
3232
## Release operations
3333

3434
- Review the [asset manifest](v0.26.0/assets.md) to confirm every expected GitHub Release attachment is present.
35-
- Use the [rollout checklist](v0.26.0/rollout-checklist.md) to walk the coordinated release from preflight through post-release verification.
35+
- Use the [rollout checklist](v0.26.0/rollout-checklist.md) to walk the desktop/CLI release plus the separate iOS TestFlight dispatch through post-release verification.
3636
- Use the [soak test plan](v0.26.0/soak-test-plan.md) to validate the highest-risk surfaces after the tag is live.

docs/releases/v0.26.0/assets.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ All macOS DMG and ZIP payloads are **code-signed** with an Apple Developer ID ce
3737

3838
## iOS (TestFlight)
3939

40-
The iOS build is uploaded directly to App Store Connect / TestFlight by the [Release iOS workflow](../../.github/workflows/release-ios.yml). No IPA artifact is attached to the GitHub Release.
40+
The iOS build is uploaded directly to App Store Connect / TestFlight by the separately dispatched [Release iOS workflow](../../.github/workflows/release-ios.yml). No IPA artifact is attached to the GitHub Release.
4141

4242
| Detail | Value |
4343
| ----------------- | ------------------------------------------ |

docs/releases/v0.26.0/rollout-checklist.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ Step-by-step playbook for the v0.26.0 release. Each phase must complete before a
3535
- [ ] Push the release-prep commit to `main`.
3636
- [ ] Create and push tag `v0.26.0`.
3737
- [ ] Verify the coordinated `release.yml` workflow starts.
38-
- [ ] Verify the separate `release-ios.yml` workflow starts for `v0.26.0`, or trigger it manually with the same version if needed.
38+
- [ ] Trigger `release-ios.yml` manually for `v0.26.0` (or the matching release ref if the tag is unavailable).
3939
- [ ] Monitor `release.yml` through Preflight, Desktop builds, Publish CLI, Publish GitHub Release, and Finalize release.
4040
- [ ] Monitor `release-ios.yml` through Preflight, iOS signing preflight, and iOS TestFlight.
4141

scripts/prepare-release.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,7 @@ ${highlights || "- See changelog for detailed changes."}
265265
266266
- **CLI:** \`npm install -g okcodes@${version}\` once the desktop/CLI release workflow finishes.
267267
- **Desktop:** Download from [GitHub Releases](${REPO_URL}/releases/tag/v${version}). Filenames are listed in [assets.md](v${version}/assets.md).
268-
- **iOS:** Available via TestFlight (uploaded automatically by the Release iOS workflow).
268+
- **iOS:** Available via TestFlight after the separate Release iOS workflow is dispatched for this tag.
269269
270270
## Known limitations
271271
@@ -274,7 +274,7 @@ OK Code remains early work in progress. Expect rough edges around session recove
274274
## Release operations
275275
276276
- Review the [asset manifest](v${version}/assets.md) to confirm every expected GitHub Release attachment is present.
277-
- Use the [rollout checklist](v${version}/rollout-checklist.md) to walk the desktop/CLI release plus the matching iOS TestFlight workflow through post-release verification.
277+
- Use the [rollout checklist](v${version}/rollout-checklist.md) to walk the desktop/CLI release plus the separate iOS TestFlight dispatch through post-release verification.
278278
- Use the [soak test plan](v${version}/soak-test-plan.md) to validate the highest-risk surfaces after the tag is live.
279279
`;
280280
}
@@ -319,7 +319,7 @@ All macOS DMG and ZIP payloads are **code-signed** with an Apple Developer ID ce
319319
320320
## iOS (TestFlight)
321321
322-
The iOS build is uploaded directly to App Store Connect / TestFlight by the [Release iOS workflow](../../.github/workflows/release-ios.yml). No IPA artifact is attached to the GitHub Release.
322+
The iOS build is uploaded directly to App Store Connect / TestFlight by the separately dispatched [Release iOS workflow](../../.github/workflows/release-ios.yml). No IPA artifact is attached to the GitHub Release.
323323
324324
| Detail | Value |
325325
| ----------------- | ------------------------------------------ |
@@ -378,7 +378,7 @@ Step-by-step playbook for the v${version} release. Each phase must complete befo
378378
- [ ] Push the release-prep commit to \`main\`.
379379
- [ ] Create and push tag \`v${version}\`.
380380
- [ ] Verify the coordinated \`release.yml\` workflow starts.
381-
- [ ] Verify the separate \`release-ios.yml\` workflow starts for the same tag or trigger it manually with the same version if needed.
381+
- [ ] Trigger \`release-ios.yml\` manually for \`v${version}\` (or the matching release ref if the tag is unavailable).
382382
- [ ] Monitor \`release.yml\` through Preflight, Desktop builds, Publish CLI, Publish GitHub Release, and Finalize release.
383383
- [ ] Monitor \`release-ios.yml\` through Preflight, iOS signing preflight, and iOS TestFlight.
384384
@@ -948,7 +948,7 @@ async function main(): Promise<void> {
948948
` 1. Monitor the desktop release workflow: ${REPO_URL}/actions/workflows/release.yml`,
949949
);
950950
console.log(
951-
` 2. Monitor the iOS TestFlight workflow: ${REPO_URL}/actions/workflows/release-ios.yml`,
951+
` 2. Trigger and monitor the iOS TestFlight workflow: ${REPO_URL}/actions/workflows/release-ios.yml`,
952952
);
953953
console.log(` 3. Verify the GitHub Release: ${REPO_URL}/releases/tag/${tag}`);
954954
console.log(" 4. Test downloaded installers on each platform.");

0 commit comments

Comments
 (0)