Skip to content

ci: migrate GitHub Release publishing to OSS Exit Gate - #129

Open
zarturod wants to merge 1 commit into
google:mainfrom
zarturod:chore/oss-exit-gate-migration
Open

zarturod wants to merge 1 commit into
google:mainfrom
zarturod:chore/oss-exit-gate-migration

Conversation

@zarturod

Copy link
Copy Markdown

Summary

Migrates three-live GitHub Releases publishing in .github/workflows/release.yml to publish through Google's OSS Exit Gate (three-live/githubreleases).

Note for Googlers: OSS Exit Gate is an internal Google security initiative for securing open-source release publishing, hosted exclusively in google3 (see http://go/oss-exit-gate and tracking bug b/584321192).

Changes

  • Scopes job permissions (id-token: write) to the publishing job and pins workflow actions to 40-character commit SHAs (google-github-actions/auth, google-github-actions/setup-gcloud, and pre-existing actions for zizmor compliance).
  • Authenticates via Google Cloud Workload Identity Federation (projects/305452601764/locations/global/workloadIdentityPools/builders/providers/github).
  • Cleans up any prior staged packages in Artifact Registry (oss-exit-gate-prod/three-live--githubreleases) before uploading to avoid stale artifacts.
  • Stages release artifacts to https://us-generic.pkg.dev/oss-exit-gate-prod/three-live--githubreleases and uploads manifest.json to gs://oss-exit-gate-prod-projects-bucket/three-live/githubreleases/manifests/ to trigger the OSS Exit Gate release pipeline.
  • Preserves cross-platform binary/Android/iOS/NPM/crates.io/SPM jobs while migrating github-release (dist-release/*) to OSS Exit Gate.

Verification (Production Smoke Test)

  • Production onboarding configuration (three-live/githubreleases) and infrastructure provisioning are live.
  • End-to-end Artifact Registry staging (google/three-live@v1.5.1: gcloud generic upload OK (three-live-1.5.1.tar.gz)) and GCS manifest upload (gs://oss-exit-gate-prod-projects-bucket/three-live/githubreleases/manifests/manifest-test-1795634083-456.json) passed.

References

@jbingham jbingham left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for putting this migration together! The WIF auth, pinned action SHAs, and Artifact Registry cleanup look solid overall, and the zizmor/CLA checks are clean. Two workflow issues need to be addressed before we merge:

  1. Preserve extracted release notes (EXIT_GATE_CHANGELOG)
    The workflow still runs node scripts/extract_release_notes.js CHANGELOG.md "${TAG}" release-notes.md, but release-notes.md is no longer wired into the release, which would publish releases with an empty body. Please stage it as EXIT_GATE_CHANGELOG so OSS Exit Gate populates the GitHub Release body (while automatically excluding it from uploaded release assets):

    cp release-notes.md "${STAGE_DIR}/EXIT_GATE_CHANGELOG"
  2. Wait for the async GitHub Release to become published before exiting github-release
    Right now github-release completes as soon as manifest.json is uploaded to GCS, whereas Exit Gate publishes asynchronously (~340 MB across 32 assets, including a ~221 MB ThreeLiveCompiler.xcframework.zip). Because pin-spm-manifest (needs: [build-ios, github-release]) immediately force-moves refs/tags/${TAG} and verify-spm-consumption immediately curls ThreeLiveCompiler.xcframework.zip, exiting before publishing finishes will race tag movement, cause verify-spm-consumption to hit 404 and silently skip verification, and leave github-release green even if Exit Gate fails.

    Could you add a bounded polling step at the end of github-release (using GITHUB_TOKEN, which only needs contents: read) that waits up to ~15 minutes for GET /repos/${{ github.repository }}/releases/tags/${RELEASE_TAG} to return HTTP 200 with ThreeLiveCompiler.xcframework.zip and ThreeLiveKernels.xcframework.zip present in .assets (failing the job on timeout)? Since Exit Gate creates releases as drafts and only publishes them after all assets upload, /releases/tags/${RELEASE_TAG} returning 200 gives us a clean completion signal.

Once those two updates are in (and we finish the one-time token/handoff setup on our side), I'll approve the remaining CI checks and merge. Thanks again!

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants