Conversation
|
| @@ -0,0 +1,256 @@ | |||
| # This workflow handles cross-platform gem building and publishing. | |||
There was a problem hiding this comment.
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.
93e42c6 to
4a25bf9
Compare
| push: | ||
| branches: | ||
| - main | ||
| paths: | ||
| - 'ruby-sdk/**' | ||
| - '.github/workflows/ruby-release.yml' |
There was a problem hiding this comment.
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@')) }} |
There was a problem hiding this comment.
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' }} |
There was a problem hiding this comment.
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@') }} |
There was a problem hiding this comment.
actual publish is only run on releases
| # - Push to main: Release readiness check (builds gems, doesn't publish) | ||
| # - Release events: Builds and publishes gems to RubyGems.org |
| # 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 |
There was a problem hiding this comment.
should this go in the README?
There was a problem hiding this comment.
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. |
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.