ci: migrate npm publish to GAR via direct WIF (AI-916)#1
Open
braines-blw wants to merge 1 commit into
Open
Conversation
606c593 to
1bfb1c5
Compare
3d54d37 to
fdcfbeb
Compare
…R via WIF Migrate .github/workflows/release.yml from GitHub Packages (npm.pkg.github.com + secrets.GITHUB_TOKEN) to Google Artifact Registry via direct Workload Identity Federation (no service account). Trigger changed to tag push to satisfy AI-920's applied WIF attribute_condition. Publishes 2.0.0-bwa.<run>. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
fdcfbeb to
7d23060
Compare
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.
Migrates
.github/workflows/release.yml(branchblue-water-autonomy) from GitHub Packages (npm.pkg.github.com+secrets.GITHUB_TOKEN) to Google Artifact Registry via direct Workload Identity Federation (no service account). Required so bob's credential broker can pull this package for power-module's e2e (AI-918) — GitHub App tokens are categorically rejected bynpm.pkg.github.com.Two blocking open problems — resolved (decisions confirmed with owner, not unilateral)
Open Problem 2 (WIF ref allowlist) → tag trigger gated to
bwa-v*. AI-920's liveattribute_condition(verified from the Done ticket / merged infra PR Ocean-Industries-Concept-Lab#227) pins this repo (publisherrepository_id 1239120577) torefs/heads/mainorrefs/tags/*. Origin has nomain, so ablue-water-autonomybranch push would fail the OIDC exchange. Trigger changed to tag push gated to thebwa-v*glob — a BWA-distinct prefix matching html-eslint / AI-917 (tags: ['bwa-v*']), chosen so a publish is not triggered by upstreamv*tags or by bob run-artifact tags such asagentic/meta/agentic/AI-916/r0XXXX.bwa-v*⊂refs/tags/*, so the already-applied WIF condition allows it — no infra change / no AI-920 follow-up needed. The tag name is only the trigger gate; the published version still comes frompackage.json.workflow_dispatchis retained but only authenticates when dispatched against a tag ref (documented in a workflow comment).Open Problem 1 (version lineage) → publish
2.0.0-bwa.<run>. This branch'spackages/openbridge-webcomponents/package.jsonis2.0.0-next.29; the unchanged stamping yields2.0.0-bwa.${GITHUB_RUN_NUMBER}. Nopackage.jsonbase change. The0.0.17lineage is the dead origin-absent localmain(out of scope). Cross-repo coordination: power-module's consumer constraint must move^0.0.17-bwa.X→2.0.0-bwa.Xas part of AI-918 (still Todo); this PR does not touch power-module.Changes
bwa-v*+workflow_dispatch; removed branch push.permissions:packages: write→id-token: write.setup-noderegistry-url/scopeandNODE_AUTH_TOKEN: secrets.GITHUB_TOKEN.google-github-actions/auth@v2(WIF providergithub-oidc-bwa-npm, noservice_account) +setup-gcloud@v2..npmrcvia anechobrace-block (not a heredoc — heredoc indentation broke the AI-920 smoke) and runsnpm publish --tag latest.checkout@v6,setup-node@v6, node 24,npm ci,cache: npm) preserved. No SA key files anywhere.Testing
In-worktree: valid YAML; all static acceptance assertions pass; tag glob is
bwa-v*(not bare*); noservice_account:YAML key (only an explanatory comment); stamping block unchanged vs fork point.Post-merge verification (out-of-band — needs the live repo + GCP, not executable in CI of this PR):
bwa-v*tag (e.g.bwa-v2.0.0) → confirm the workflow authenticates via WIF and publishes. (Nobwa-v*tags exist on origin yet; the existingagentic/.../r05009artifact tag correctly does not match.)gcloud artifacts versions list --repository=bwa-npm --location=us-central1 --project=blue-water-autonomy-operations --package=openbridge-webcomponentsshows the new2.0.0-bwa.<run>.Linear: AI-916
🤖 Generated with Claude Code