diff --git a/.github/workflows/android-apk-release.yml b/.github/workflows/android-apk-release.yml index ba4fc3a73..bb8af2a4a 100644 --- a/.github/workflows/android-apk-release.yml +++ b/.github/workflows/android-apk-release.yml @@ -4,6 +4,7 @@ on: push: tags: - "v*" + - "android-v*" workflow_dispatch: inputs: tag: diff --git a/docs/RELEASE.md b/docs/RELEASE.md index c323047c6..fafebe233 100644 --- a/docs/RELEASE.md +++ b/docs/RELEASE.md @@ -37,18 +37,24 @@ npm run release:finalize # Publish npm, promote draft to published **NEVER bump the version to fix a build problem.** New versions are reserved for meaningful product changes (features, fixes, improvements). Build/CI failures are fixed on the current version. -To retry a failed workflow for an existing tag: +**NEVER use `workflow_dispatch` to retry release builds.** The `workflow_dispatch` trigger runs the workflow file from the default branch but checks out the code at the tag ref (`ref: ${{ inputs.tag }}`). This means build fixes committed to `main` won't be picked up — the old broken code at the tag gets built again. -1. **Retry via `workflow_dispatch`** — all release workflows support `workflow_dispatch` with a `tag` input: - ```bash - gh workflow run "Desktop Release" -f tag=v0.1.28 # all platforms - gh workflow run "Desktop Release" -f tag=v0.1.28 -f platform=macos # single platform - gh workflow run "Android APK Release" -f tag=v0.1.28 - gh workflow run "Deploy App" # no tag input needed - ``` -2. **Platform-specific retry tags** (desktop only) — push a tag like `desktop-macos-v0.1.28` to rebuild just that platform against the release tag's code +To retry a failed workflow, **always push a retry tag** on the commit you want to build: -If the fix requires a code change (e.g. a broken build script), commit the fix to `main` and use `workflow_dispatch` pointing at the existing tag — the workflow checks out the tag ref, but for build-tooling fixes you may need to point it at `main` or cherry-pick the fix onto the tag. +```bash +# Desktop (all platforms) +git tag -f desktop-v0.1.28 HEAD && git push origin desktop-v0.1.28 --force + +# Desktop (single platform) +git tag -f desktop-macos-v0.1.28 HEAD && git push origin desktop-macos-v0.1.28 --force +git tag -f desktop-linux-v0.1.28 HEAD && git push origin desktop-linux-v0.1.28 --force +git tag -f desktop-windows-v0.1.28 HEAD && git push origin desktop-windows-v0.1.28 --force + +# Android APK +git tag -f android-v0.1.28 HEAD && git push origin android-v0.1.28 --force +``` + +This ensures the checkout ref matches the actual code on `main` with the fix included. ## Notes