11---
2- description : " Create a new release: bump version, create PR, build mainnet , tag, draft release"
2+ description : " Create a new release: bump version, create PR, run release workflow , tag, draft release"
33allowed_tools : Bash, Read, Edit, Write, Glob, Grep, AskUserQuestion, mcp__github__create_pull_request, mcp__github__list_pull_requests, mcp__github__pull_request_read, mcp__github__get_file_contents, mcp__github__update_pull_request
44---
55
@@ -77,6 +77,8 @@ Cherry-pick the commits you need onto this branch now, then continue.
7777```
7878Wait for the user to confirm they are done cherry-picking before proceeding.
7979
80+ If the base is a tag that predates the release workflow changes, port the current release workflow support onto the release branch before proceeding. At minimum, the release branch/tag must contain the updated artifact naming in ` .github/workflows/release.yml ` , otherwise Step 7 will dispatch an old workflow and then look for an artifact name it cannot produce.
81+
8082Finalize changelog after the release branch contains all release commits:
8183
8284``` bash
@@ -202,22 +204,64 @@ gh release edit v{newVersionName} --notes-file /tmp/release-notes.md
202204
203205Print the path to the release notes file so the user can share it for review.
204206
205- ### 7. Build Mainnet Release
207+ ### 7. Run Store Release Workflow
206208
207209``` bash
208- just release
210+ release_ref=" v{newVersionName}"
211+ release_artifact_dir=" .ai/release-artifacts-{newVersionName}"
212+ if ! git show " $release_ref :.github/workflows/release.yml" | grep -q ' bitkit-release-$build_number-$GITHUB_RUN_NUMBER' ; then
213+ echo " Release ref $release_ref does not contain the current release artifact naming." >&2
214+ echo " Port the release workflow changes onto the release branch, retag, then rerun /release." >&2
215+ exit 1
216+ fi
217+ dispatch_started_at=" $( date -u +" %Y-%m-%dT%H:%M:%SZ" ) "
218+ gh workflow run release.yml --ref " $release_ref "
219+ run_id=" "
220+ for attempt in {1..30}; do
221+ run_id=" $( gh run list \
222+ --workflow release.yml \
223+ --branch " $release_ref " \
224+ --event workflow_dispatch \
225+ --created " >=$dispatch_started_at " \
226+ --limit 1 \
227+ --json databaseId \
228+ --jq ' .[0].databaseId // empty' ) "
229+ if [ -n " $run_id " ]; then
230+ break
231+ fi
232+ sleep 5
233+ done
234+ if [ -z " $run_id " ]; then
235+ echo " Failed to find release workflow run for $release_ref " >&2
236+ exit 1
237+ fi
238+ gh run watch " $run_id " --exit-status
239+ workflow_run_url=" $( gh run view " $run_id " --json url --jq .url) "
240+ run_number=" $( gh run view " $run_id " --json number --jq .number) "
241+ rm -rf " $release_artifact_dir "
242+ mkdir -p " $release_artifact_dir "
243+ gh run download " $run_id " \
244+ --name " bitkit-release-{newVersionCode}-${run_number} " \
245+ --dir " $release_artifact_dir "
246+ if command -v sha256sum > /dev/null; then
247+ (cd " $release_artifact_dir " && sha256sum -c SHA256SUMS.txt)
248+ else
249+ (cd " $release_artifact_dir " && shasum -a 256 -c SHA256SUMS.txt)
250+ fi
209251```
210252
211- Expected APK path: ` app/build/outputs/apk/mainnet/release/bitkit-mainnet-release-{newVersionCode}-universal.apk `
212- Expected AAB path: ` app/build/outputs/bundle/mainnetRelease/bitkit-mainnet-release-{newVersionCode}.aab `
253+ Expected APK path: ` .ai/release-artifacts-{newVersionName}/bitkit-mainnet-release-{newVersionCode}-universal.apk `
254+ Expected AAB path: ` .ai/release-artifacts-{newVersionName}/bitkit-mainnet-release-{newVersionCode}.aab `
255+
256+ Verify both files exist. If the workflow fails or the artifact checksum verification fails, stop and report the error to the user.
213257
214- Verify both files exist. If the build fails, stop and report the error to the user .
258+ Store ` workflow_run_url ` for the summary .
215259
216- ### 8. Upload APK to Draft Release
260+ ### 8. Upload Workflow APK to Draft Release
217261
218262``` bash
219263gh release upload v{newVersionName} \
220- app/build/outputs/apk/mainnet/ release/bitkit-mainnet-release-{newVersionCode}-universal.apk
264+ .ai/ release-artifacts-{newVersionName} /bitkit-mainnet-release-{newVersionCode}-universal.apk
221265```
222266
223267### 9. Return to Master
@@ -235,14 +279,16 @@ Version bump PR: {PR URL}
235279Release branch: release-{newVersionName}
236280Tag: v{newVersionName}
237281Draft release: {release URL}
282+ Release workflow: {workflow run URL}
283+ Artifacts: .ai/release-artifacts-{newVersionName}
238284APK uploaded: bitkit-mainnet-release-{newVersionCode}-universal.apk
239285Store release notes: .ai/release-notes-{newVersionName}.md
240286
241287Next steps:
242288- Share release notes with Jacobo for review
243- - QA the APK
244- - If patching the release branch: increment only versionCode, re-tag, rebuild, and re-upload
245- - Submit to Play Store when QA passes
289+ - QA the workflow-built APK
290+ - Submit the workflow-built AAB to Play Store when QA passes
291+ - If patching the release branch: increment only versionCode, re-tag, rerun the release workflow, and re-upload
246292- Publish the draft release on GitHub after store release
247293- Merge release branch PR into master
248294```
0 commit comments