Skip to content

fix: separate beta and production release environments#1228

Merged
abueide merged 1 commit intomasterfrom
fix/separate-beta-production-environments
Apr 14, 2026
Merged

fix: separate beta and production release environments#1228
abueide merged 1 commit intomasterfrom
fix/separate-beta-production-environments

Conversation

@abueide
Copy link
Copy Markdown
Contributor

@abueide abueide commented Apr 14, 2026

Summary

Split release workflow to use different GitHub environments for beta vs production releases.

Problem

Currently, all releases (beta and production) use the same "Publish" environment which requires manual approval from reviewers. This prevents team members from self-publishing beta releases for customer testing.

Solution

Created two separate environments with different protection rules:

Publish-Beta (New)

  • ✅ No reviewer approval required
  • ✅ Restricted to * branches (any branch from Segment org members)
  • ✅ Team members can self-publish betas for testing
  • ❌ External contributors cannot publish

Publish (Existing)

  • ✅ Requires reviewer approval (secondary check)
  • ✅ Used for production releases only
  • ✅ Maintains safety for stable releases

Changes

  • Split release job into three separate jobs:
    • release-dryrun - No environment (no publishing)
    • release-beta - Uses Publish-Beta environment
    • release-production - Uses Publish environment
  • Each job runs conditionally based on inputs.type

Workflow

Beta releases (self-service for team):

  1. Push feature/fix branch
  2. Actions → Release → Beta
  3. Publishes immediately (no approval needed)

Production releases (requires approval):

  1. Ensure code is on master
  2. Actions → Release → Production
  3. Waits for reviewer approval
  4. Publishes after approval

Security

  • ✅ Only Segment org members can trigger workflows
  • ✅ Both environments restricted to org members
  • ✅ Production still requires secondary approval
  • ✅ NPM provenance enabled for all releases

🤖 Generated with Claude Code

Separate release jobs by type to use different GitHub environments:
- Beta releases: Use "Publish-Beta" (no approval required for org members)
- Production releases: Use "Publish" (requires reviewer approval)
- Dry-run: No environment (no publishing)

This allows Segment org team members to self-publish beta releases
for testing while maintaining secondary approval for production releases.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
@abueide abueide merged commit 123061e into master Apr 14, 2026
7 checks passed
@abueide abueide deleted the fix/separate-beta-production-environments branch April 14, 2026 19:47
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