Skip to content

chore(ci): build cross_gems on main#405

Merged
dd-oleksii merged 1 commit intomainfrom
oleksii/jj-rvotvmwmywzy
Jan 7, 2026
Merged

chore(ci): build cross_gems on main#405
dd-oleksii merged 1 commit intomainfrom
oleksii/jj-rvotvmwmywzy

Conversation

@dd-oleksii
Copy link
Collaborator

In the past, we have experienced a couple of cross_gems failures right when we tried to publish a release. This required us to delete release, tags, fix the issue, and re-try publishing a release. Not pretty.

This PR makes cross_gems run on main branch (but without blocking). This should help us test that cross_gems works before we attempt a release.

@changeset-bot
Copy link

changeset-bot bot commented Jan 7, 2026

⚠️ No Changeset found

Latest commit: 4a25bf9

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@@ -0,0 +1,256 @@
# This workflow handles cross-platform gem building and publishing.
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This is mostly a move from publish.yml. The only difference is different on triggers, if and continue-on-error

In the past, we have experienced a couple of cross_gems failures right
when we tried to publish a release. This required us to delete
release, tags, fix the issue, and re-try publishing a release. Not
pretty.

This PR makes cross_gems run on main branch (but without blocking).
This should help us test that cross_gems works before we attempt a
release.
@dd-oleksii dd-oleksii force-pushed the oleksii/jj-rvotvmwmywzy branch from 93e42c6 to 4a25bf9 Compare January 7, 2026 16:37
Comment on lines +15 to +20
push:
branches:
- main
paths:
- 'ruby-sdk/**'
- '.github/workflows/ruby-release.yml'
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

adding this on-push trigger, so we test cross gems on main branch as well

# - We skip PRs to avoid noise (ruby_test already validates functionality).
cross_gems:
runs-on: ubuntu-latest
if: ${{ github.event_name == 'push' || (github.event_name == 'release' && startsWith(github.ref_name, 'ruby-sdk@')) }}
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

building on both ruby-sdk releases and pushes to main

cross_gems:
runs-on: ubuntu-latest
if: ${{ github.event_name == 'push' || (github.event_name == 'release' && startsWith(github.ref_name, 'ruby-sdk@')) }}
continue-on-error: ${{ github.event_name != 'release' }}
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

allow failure on main (because the latest eppo_core might be not published yet) but not on releases

publish_ruby:
name: Publish to RubyGems
runs-on: ubuntu-latest
if: ${{ github.event_name == 'release' && startsWith(github.ref_name, 'ruby-sdk@') }}
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

actual publish is only run on releases

Copy link
Collaborator

@typotter typotter left a comment

Choose a reason for hiding this comment

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

lgtm 🚀

Comment on lines +4 to +5
# - Push to main: Release readiness check (builds gems, doesn't publish)
# - Release events: Builds and publishes gems to RubyGems.org
Copy link
Collaborator

Choose a reason for hiding this comment

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

💪

Comment on lines +7 to +11
# To publish a new Ruby SDK version:
# 1. Ensure eppo_core is published first if ruby-sdk depends on a new version.
# 2. Create a GitHub release with tag format: ruby-sdk@x.x.x (e.g., ruby-sdk@3.7.5)
# 3. The workflow will cross-compile gems for all platforms
# 4. If successful, gems are automatically published to RubyGems.org
Copy link
Collaborator

Choose a reason for hiding this comment

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

should this go in the README?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

We already have publish instructions in readme. This is adding a ruby-specific version for folks lurking in workflow files

#
# Implications:
# - If ruby-sdk needs an unpublished eppo_core change, this job will
# fail until eppo_core is published.
Copy link
Collaborator

Choose a reason for hiding this comment

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

🙌

@dd-oleksii dd-oleksii merged commit dde445f into main Jan 7, 2026
12 checks passed
@dd-oleksii dd-oleksii deleted the oleksii/jj-rvotvmwmywzy branch January 7, 2026 17:24
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

Comments