feat: support beta releases from any branch

EO
4mo ago
+232-32

Closes #2250

What

The publish workflow was hardcoded to always build from and push back to main. This PR makes the source branch configurable so beta releases can be triggered from any branch without touching main.

Changes

publish.yml

AreaBeforeAfter
workflow_dispatch inputschannel, dry_run, release_notesAdded branch input (default: main)
Checkout stepAlways checked out default refChecks out inputs.branch via ref:
Commit patched Info.plistHardcoded origin/main rebase + pushUses inputs.branch dynamically
gh release createNo --target, defaulted to repo default branch--target ${{ inputs.branch }}
concurrency.grouppublish-${{ inputs.channel }}publish-${{ inputs.branch }}-${{ inputs.channel }} — parallel beta runs from different branches no longer cancel each other

build.sh is untouched — it was already branch-agnostic.

Usage after this PR

Trigger a beta from a feature branch:

gh workflow run publish.yml \
  --ref main \
  --field branch=feature/my-feature \
  --field channel=beta \
  --field dry_run=false

Or via the GitHub Actions UI: select the workflow, set Branch to your feature branch, channel to beta.

Main-based releases are unaffected — branch defaults to main, so existing usage requires no changes.

Summary by Sourcery

Allow the publish workflow to create beta releases from any branch instead of being hardcoded to main.

New Features:

  • Add a configurable workflow_dispatch input to choose the source branch for releases.

Enhancements:

  • Make checkout, plist commit, and GitHub release targeting branch-aware based on the provided input.
  • Update workflow concurrency grouping to include branch name so runs from different branches do not cancel each other.
  • Improve inline documentation to describe branch-based release behavior and recovery steps.

Summary by cubic

Enable beta and stable releases from any branch without touching main. Default behavior is unchanged—set the branch input to release from another branch. Addresses #2250.

  • New Features

    • Added branch input (default main); checkout and the Info.plist bump target inputs.branch.
    • Release job checks out the released tag; gh release create relies on the tag (no --target).
  • Bug Fixes

    • Concurrency scoped to inputs.branch + channel; inputs.branch validated via git check-ref-format --branch and passed via env in shell steps.
    • Consolidated git identity; SHA-pinned actions/upload-artifact and actions/download-artifact; added a tag reachability guard before creating a release.
    • Docs consolidated: removed docs/RELEASING.md, merged guidance into docs/development.md (feature-branch betas, tag-collision recovery), and expanded workflow comments with collision recovery, CHANNEL interpolation safety, and tag-injection notes. runbot-hq/afm-release-notes-action remains @main by design.

Summary by CodeRabbit

  • New Features
    • Added a manual release option to choose the source branch (default: main) for checkout, build, and publishing.
  • Bug Fixes
    • Improved workflow concurrency isolation by scoping cancellation to both branch and release channel.
    • Strengthened release workflow safeguards around branch validity and tag targeting before creating GitHub releases.
  • Documentation
    • Added docs/RELEASING.md, detailing beta/stable/dry run triggers, version/tag rules, and recovery steps for partial failures.