Skip to content

Restrict npm publish job to main branch and version tags#5156

Closed
captbaritone wants to merge 1 commit intofacebook:mainfrom
captbaritone:fix-npm-publish-ci-condition
Closed

Restrict npm publish job to main branch and version tags#5156
captbaritone wants to merge 1 commit intofacebook:mainfrom
captbaritone:fix-npm-publish-ci-condition

Conversation

@captbaritone
Copy link
Contributor

Summary

  • Add branch/tag condition to the main-release job to only run on pushes to main or version tags (e.g., v1.0.0)
  • Prevents permission errors when the job runs on non-main branches where the npm-publish environment is not accessible

Test plan

  • Verify CI passes on this PR (the main-release job should be skipped)
  • Confirm npm publish still works when merging to main

Add branch/tag condition to the main-release job to avoid permission
errors when the job runs on non-main branches. The npm-publish
environment permissions cause GitHub to fail the job early on branches
that don't have access.
@meta-cla meta-cla bot added the CLA Signed label Jan 28, 2026
@meta-codesync
Copy link
Contributor

meta-codesync bot commented Jan 29, 2026

@captbaritone has imported this pull request. If you are a Meta employee, you can view this in D91795710.

@meta-codesync
Copy link
Contributor

meta-codesync bot commented Feb 9, 2026

@captbaritone merged this pull request in 3d2629a.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants