Add Figma Bazel release workflow - #1
Merged
Merged
Conversation
Add a manually-triggered GitHub Actions workflow that builds Figma's Bazel fork from source and publishes a GitHub release with binaries named per Bazelisk's conventions. The workflow lives on the default branch so it can be triggered from the Actions UI, and builds whatever `ref` is supplied — the file never needs editing between releases. Two inputs drive everything: * ref branch/tag/commit to build (e.g. 8.6.0-figma) * embed_label release version (e.g. 8.6.0-figma.1) USE_BAZEL_VERSION is derived from embed_label (strip `-figma...`) so the host Bazel matches the upstream base, instead of relying on the checked-in .bazelversion. Builds //src:bazel and //src:bazel_nojdk for linux-x86_64, linux-arm64, and darwin-arm64, uploads each as bazel[_nojdk]-<label>-<os>-<arch> with .sha256, then publishes a release tagged <embed_label>. Release notes document drift from upstream (base tag, stacked commits, cross-fork compare link) and the Bazelisk usage. Consumers pin a build with USE_BAZEL_VERSION=figma/<embed_label>. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
dmiller-figma
approved these changes
Jun 22, 2026
This was referenced Jun 22, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Adds
.github/workflows/figma-release.yml— a manually-triggered (workflow_dispatch) GitHub Actions workflow that builds Figma's Bazel fork from source and publishes a GitHub release with binaries named per Bazelisk's conventions.Motivation: we periodically cut our own Bazel builds from fork branches like
8.6.0-figma(cf. https://github.com/aspect-forks/bazel/releases). This automates that with GHA instead of building locally by hand.How it works
Lives on the default branch (
master) so it appears under Actions → Figma Bazel Release → Run workflow. It builds whateverrefyou give it, so the file never needs editing between releases.Single input —
ref(the fork branch, by convention<upstream-version>-figma, e.g.8.6.0-figma). Everything else is computed by a fastsetupjob, so there is no hand-typed version string to get wrong:refwith-figma...stripped (validatedx.y.z); used as the host Bazel viaUSE_BAZEL_VERSION. The job also assertsrefdescends from the upstream<base>tag, so a branch mislabeled8.6.0-figmabut really cut from 8.5.0 fails fast.max(existing <base>-figma.N) + 1— re-cuts can't collide with or skip a prior number; first build is.1.<base>-figma.<counter>(e.g.8.6.0-figma.2).The resolved commit SHA is pinned once in
setupand checked out by every build leg + the release job, so all platforms build an identical tree and the release targets that exact commit.Build:
//src:bazel+//src:bazel_nojdkwith-c opt --stamp --embed_label … --incompatible_strict_action_env=trueonubuntu-22.04,ubuntu-22.04-arm,macos-14. Uploadsbazel-<label>-<os>-<arch>andbazel_nojdk-<label>-<os>-<arch>(+.sha256), thengh release create <embed_label>.Release notes auto-document drift: upstream base tag, stacked-commit list (
git log upstream-<base>..HEAD, or "None yet"), cross-fork compare link, and the Bazelisk usage snippet.Consuming a release
Bazelisk resolves this to
github.com/figma/bazel/releases/download/8.6.0-figma.2/bazel-8.6.0-figma.2-<os>-<arch>.Notes / risks
ubuntu-22.04-arm(GitHub-hosted ARM Linux) is free on public repos; if this repo is private, ARM larger-runners must be enabled or that leg fails.8.6.0-figmabranch is currently identical to upstream8.6.0(zero drift), so the first run produces a vanilla 8.6.0 build labeled8.6.0-figma.1.🤖 Generated with Claude Code